public void reset() {
        for (int x = 0; x < tiles.length; x++) {
            for (int y = 0; y < tiles[x].length; y++) {
                tiles[x][y] = new Tile(x, y);
                if (x == 0 && y == 0) {
                    tiles[x][y].setState(State.START);
                    start = tiles[x][y];
                } else if (x == tiles.length - 1 && y == tiles[x].length - 1) {
                    tiles[x][y].setState(State.END);
                    end = tiles[x][y];
                }
                tiles[x][y].setScreenX(10 + x * 15);
                tiles[x][y].setScreenY(10 + y * 15);
            }
        }

        for (int x = 0; x < tiles.length; x++) {
            for (int y = 0; y < tiles[x].length; y++) {
                calculateNeighbors(tiles[x][y], x, y);
            }
        }

        calculated = false;
    }