public class GamingArea {
    public Position[][] playingField;
    public Position[][] getPlayingField()
    {
        return playingField;
    }
    public GamingArea(int height, int width)
    {
        playingField = new Position[height][width];
        for (int row = 0; row < height; row++) {
            for (int col = 0; col < width; col++) {
                playingField[row][col] = new Position(row, col);
            }
        }
    }

    public boolean validatePosition(Position p) {
        try {
            Position po = this.playingField[p.posX][p.posY];
        } catch (IndexOutOfBoundsException ex) {
            return false;
        }
        return true;
    }
}
