@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; } }
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"); }