Package nfc.sample.tictactoe.game

Examples of nfc.sample.tictactoe.game.GameState


public class SelectTileCommand extends AlwaysExecutableCommand {
   
    private int _symbol;
   
  public void execute(ReadOnlyCommandMetadata metadata, Object context) {
      GameState game_state = GameState.getInstance();
      if (game_state.isBoardLocked()) {
          return;
      }
      if (context instanceof MultiStateButtonField) {
          int current_tile = game_state.getCurrent_tile();
          game_state.updateTileThisPlayer(current_tile,_symbol);
      }
  }
View Full Code Here


    private int focused_tile = 0;

    public SymbolSelectionScreen() {
        super(Field.USE_ALL_HEIGHT | Field.USE_ALL_WIDTH);
       
        GameState game_state = GameState.getInstance();
        game_state.setGame_over(false);
       
        uiconfig = UiConfigFactory.getUiConfig(Display.getWidth(), Display.getHeight());
        Bitmap nought_unfocused = BitmapFactory.getNoughtUnfocused();
        Bitmap nought_focused = BitmapFactory.addStateIndicator(nought_unfocused, Constants.FOCUSED_COLOUR);
        Bitmap nought_clicked = BitmapFactory.addStateIndicator(nought_unfocused, Constants.CLICKED_COLOUR);
View Full Code Here

TOP

Related Classes of nfc.sample.tictactoe.game.GameState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.