Commit Graph

53 Commits

Author SHA1 Message Date
5d340f0805 Figured out that the implementation of turn left
was actually dfs lol
2023-08-13 21:31:47 +02:00
64f99f28ce fixed lil mistake eheh 2023-08-11 14:34:12 +02:00
648e4c15fc Commented out image writer tests cuz i gotta think
of a good way to do them :)
2023-08-11 14:31:51 +02:00
c6aca1e6d6 Fixed workflows 2023-08-11 14:29:35 +02:00
437b81a126 Updated the github workflows 2023-08-11 14:27:24 +02:00
0cdbb37368 Does this one work? 2023-08-11 14:18:52 +02:00
5f0185c9a2 Fixed github workflow (hopefully) 2023-08-11 14:10:35 +02:00
afceafaf49 Refactored main.go to make the entry point clearer 2023-08-11 14:09:31 +02:00
6fd16b99e9 Added github workflow for auto-generating
pre-resleases
2023-08-11 14:05:55 +02:00
cf5286d1c2 Fixed failing tests 2023-08-11 13:48:39 +02:00
d28c118102 Added argument parsing to run the solver correctly 2023-08-11 12:30:37 +02:00
e5840321e2 Added a solver: turn left 2023-08-10 19:39:16 +02:00
144d3c2aed Added a logging system to show home much time it
took to do a certain part of the program
2023-08-10 19:38:43 +02:00
42cc4f8717 Corrected some bugs for when it came to parsing
and writing mazes
2023-08-10 19:13:24 +02:00
3ef61967a5 added new maze (15x15) for testing purposes 2023-08-10 19:11:15 +02:00
d1d3ed1c73 Changed type of maze in SolvedMaze to pointer, to
not copy the entire maze by value
2023-08-10 10:30:37 +02:00
bd8165e47f renamed assets so that they are more consistent 2023-08-09 19:54:38 +02:00
21385e9b2d implemented image reader 2023-08-09 19:51:23 +02:00
1393d9175e added the png version of the mazes used for
testing purposes (so that the reader has something to read)
2023-08-09 17:46:24 +02:00
9e7c6b5e24 Written the ImageWriter 2023-08-09 17:44:59 +02:00
cffc3b5939 Moved the generation of the solved mazes into its
own file since they are needed for both ImageWriter and StringsWriter
2023-08-09 17:42:53 +02:00
235814a418 Added description comments 2023-08-09 17:41:44 +02:00
4fa1bc3206 Updated writer interface and wrote the strings
writer
2023-08-09 10:21:11 +02:00
94a18102df Made the maze generation part of normal.txt a bit
shorter and more readable (or at least i hope so)
2023-08-09 10:17:00 +02:00
805aac2681 Removed TODO commment that was done 2023-08-09 10:14:45 +02:00
3407aa4ed8 fixed name of file name in comment 2023-08-09 10:14:29 +02:00
104419b239 Forgot to put the width and height of the maze
when I parsed it, oops (and now it's tested)
2023-08-07 18:22:04 +02:00
6b045e25e0 moved assertEquals to utils so that other tests
can use it
2023-08-07 18:18:25 +02:00
36051b06f6 Re-enabled text_test.go 2023-08-07 18:09:58 +02:00
19f83899be Fixed parser 2023-08-07 17:43:35 +02:00
3f8f0a2e92 Removed useless prints in parser_test 2023-08-07 17:43:01 +02:00
7e86e29e82 Moved RawMaze to reader package since it is used
mostly there
2023-08-05 16:36:49 +02:00
fa4c13812d Reader -> Reader+Parser refactoring: COMPLETE
Added a string reader too so that one can create a maze just with a slice of stings and RawMaze now has chunks of bytes to limit memory usage with big mazes (hopefully)
2023-08-05 16:21:56 +02:00
e2b0b09636 Added min function to utils to get min between two
comparable types (how isn't it in the STL?)
2023-08-05 16:15:54 +02:00
71c841bfef Added isWall and isPath to RawMaze with tests 2023-08-05 12:02:42 +02:00
0bee145c8e Reader -> Reader+Parser refactoring: main.go now
uses the new structure
2023-08-05 12:01:29 +02:00
5445d28b2c Moved RaMaze to its own file, cuz we gonna need
some more functions and it would just clutter maze.go
2023-08-05 11:29:53 +02:00
fccfde890a Reader -> Reader+Parser refactoring: added tests
for new reader
2023-08-05 11:21:32 +02:00
19ab3c9cf3 Added String() method to RawMaze for debugging
purposes
2023-08-05 11:20:53 +02:00
221bcf2695 Reader -> Reader+Parser refactoring: moved the
reading of the lines to its own function
2023-08-05 11:03:42 +02:00
fcb2bc0d51 Reader -> Reader+Parser refacfotring: create the
parser package, moved the parsing aspect of reader
to parser (still have some naughty stuff like
WallChar and PathChar in parser but it'll be fixed
in next commit)
2023-08-05 10:38:46 +02:00
cfa683dc83 Start of refactoring for reader+parser: read all
the lines before starting to parse
2023-08-05 10:01:34 +02:00
cc85f5606f moved instructions around to make it more
consistent and fixed tiny bug
2023-08-05 09:38:12 +02:00
4c34019acc Added missing logic to text reader and tested it 2023-08-04 23:53:34 +02:00
dbcaf137ef Added a new test case for text reader 2023-08-04 23:06:37 +02:00
7c7c2d04d4 Removed useless print statements 2023-08-04 23:05:16 +02:00
4d25743ee5 Written the first version of a text reader, with
tests
2023-08-04 21:05:28 +02:00
547137a3cd Updated gitignore 2023-08-04 21:05:14 +02:00
0ff76d6dff Changed the structure of the Maze struct 2023-08-04 19:11:26 +02:00
63b365bceb Renamed maze-solver.go to main.go 2023-08-04 19:11:00 +02:00