Exemplo n.º 1
0
 @Override
 public void onNextTurn() {
   switch (game.getState()) {
     case OnGoing:
       showCurrentPlayer();
       if (game.getCurrentPlayer().getAi()) {
         bots[game.getCurrentColor().ordinal()].play();
         grid.invalidate();
       }
       break;
     case Review:
       showCurrentPlayer();
       break;
   }
 }
Exemplo n.º 2
0
 void showCurrentPlayer() {
   SColor color = game.getCurrentColor();
   toolBar.setLogo(color.equals(SColor.BLACK) ? R.drawable.stone_black : R.drawable.stone_white);
   toolBar.setLogoDescription(color.toString());
   toolBar.setSubtitle(game.getCurrentPlayer().getName() + " to play");
 }