Esempio n. 1
0
 @Override
 public GameTile getGameboardState(Position pos) {
   return this.board[pos.getX()][pos.getY()];
 }
Esempio n. 2
0
 public static void setGameboardState(
     final Position pos, final GameTile tile, GameTile[][] tiles) {
   tiles[pos.getX()][pos.getY()] = tile;
 }
Esempio n. 3
0
 /**
  * @param pos The position to test.
  * @return <code>false</code> if the position is outside the playing field, <code>true</code>
  *     otherwise.
  */
 private boolean isOutOfBounds(Position pos) {
   return pos.getX() < 0
       || pos.getX() >= Constants.getGameSize().width
       || pos.getY() < 0
       || pos.getY() >= Constants.getGameSize().height;
 }