Commit graph

6 commits

Author SHA1 Message Date
98a7533de8
refactor: a bit of refactoring
- Move the custom exceptions to errors.py
- Created enums to label the cell walls. Replaces the constants defined
  in the Cell class.
2024-02-14 10:14:27 +00:00
79d9727273
add tests to test Cell exceptions 2024-02-14 02:50:57 +00:00
d87df48df2
refactor: add a draw method in CellWall
Add a draw() method in the CellWall class to reduce repeated code in the
Cell class.

Updated test case.
2024-02-13 21:40:56 +00:00
6d919a99d6
fix: add errors for invalid cell creation
- Raise CellInvalidError when attempting to specify the wrong corners of
  the cell when creating it. The x and y values should always represent
  the top left and bottom right corners of the cell.
- Raise CellTooSmallError when attempting to specify a cell which is too
  small to correctly draw its central point.
2024-02-13 18:54:58 +00:00
536711f808
feat: add entrance, exit to the maze.
- Add an entrance and exit to the maze. The entrance will always
  be on the top left and the exit will always be on the bottom
  right.
- Add a simple GitHub actions workflow to run the Python tests.
2024-02-13 15:52:28 +00:00
70175b3afd
test: add tests for the Maze class
Add some tests to test the Maze constructor.
2024-02-13 14:21:35 +00:00