public void update() { int tokenID = game.getCurrentPlayer().getPlayerID(); int tokenTile = game.getCurrentPlayer().getToken().getLandIndex() % game.getBoard().getSize(); tokens.get(tokenID).setLocation(tileCoordinates[tokenTile][0], tileCoordinates[tokenTile][1]); drawCircle(tokenID, tokenTile); repaint(); revalidate(); // Test Purpose System.out.println("Dice : " + DicePair.getDiceValue()); System.out.println( "Player : " + game.getCurrentPlayer().getName() + " - index : " + game.getCurrentPlayer().getToken().getLandIndex()); }
protected Land getCurrentLand(Game game) { return game.getBoard().getLands().get(game.getCurrentPlayer().getToken().getLandIndex()); }