@Override public GameTile getGameboardState(Position pos) { return this.board[pos.getX()][pos.getY()]; }
public static void setGameboardState( final Position pos, final GameTile tile, GameTile[][] tiles) { tiles[pos.getX()][pos.getY()] = tile; }
/** * @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; }