This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class GameGUI | |
| def initialize(repeater) | |
| @repeater = repeater | |
| @repeater.subscribe(self) | |
| end | |
| # When a player (color) clicks on board location | |
| # x,y we attempt a move by broadcasting it | |
| def on_click(color, x, y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Singleton service to manage notifications | |
| * for players using GET /notifications/token | |
| * for some player token | |
| */ | |
| function NotificationService() { | |
| var instance = (function() { | |
| /* | |
| * Private variables | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Initialize all boat positions for a given player | |
| */ | |
| private boolean initBoatPositions(String message) { | |
| boatPositions = new String[(Player.boats).length][]; | |
| String[] boatInfo = message.split(","); | |
| ArrayList<String> usedPositions = new ArrayList<String>(); | |
| for(String boat : boatInfo) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils xorg-xauth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setenv DISPLAY=localhost:10.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| X11Forwarding yes | |
| X11DisplayOffset 10 | |
| X11UseLocalhost yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ForwardX11 yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -X user@ip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ListBox list = null; | |
| switch (direction) | |
| { | |
| case ConversionDirection.TO: | |
| list = toUnitList; | |
| break; | |
| case ConversionDirection.FROM: | |
| list = fromUnitList; | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # config/application.rb: | |
| - require 'rails/all' | |
| + require "action_controller/railtie" | |
| + require "action_mailer/railtie" | |
| + require "active_resource/railtie" | |
| + require "rails/test_unit/railtie" | |
| + require "sprockets/railtie" # Only required if you're using asset pipeline |