Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
Co-authored-by: griase94 <[email protected]>
  • Loading branch information
ndrsllwngr and griase94 committed Sep 17, 2020
1 parent f76a04f commit 68e0e30
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Game/Board.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,6 @@ coordinateToCellNumber (i, j) (_, w) = (i -1) * w + j
inBounds :: Coordinate -> Dimension -> Bool
inBounds (i, j) (h, w) = (i > 0) && (i <= h) && (j > 0) && (j <= w)

-- Calculates all inBounds direct (non diagonal) neighbour cells of a given cell
directNeighbourCells :: Coordinate -> Dimension -> [Coordinate]
directNeighbourCells (i, j) d = filter (`inBounds` d) theoreticalNeighbors
where
theoreticalNeighbors =
[ (i -1, j), -- top
(i, j -1), -- left
(i, j + 1), -- right
(i + 1, j) -- bottom
]

-- Calculates all inBounds (including diagonal) neighbour cells of a given cell
neighbourCells :: Coordinate -> Dimension -> [Coordinate]
neighbourCells (i, j) d = filter (`inBounds` d) theoreticalNeighbors
Expand Down

0 comments on commit 68e0e30

Please sign in to comment.