diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-04-22 16:41:33 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-04-22 16:41:46 +0200 |
commit | e5b08e0edb4c1c30c368c338a9148b846b087f5f (patch) | |
tree | e5b59a4da5a523eaadc6212c9b57da204e660b73 /maze_solver.rb | |
parent | df356d42954107688b7484b595ff1e33cd70291c (diff) |
Refactor print statements
Diffstat (limited to 'maze_solver.rb')
-rw-r--r-- | maze_solver.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/maze_solver.rb b/maze_solver.rb index 5633515..90af0c1 100644 --- a/maze_solver.rb +++ b/maze_solver.rb @@ -18,9 +18,10 @@ class MazeSolver if ENV["DEBUG"] == "visual" TUI::Screen.save TUI::Screen.reset - print "\n [ #{TUI::Color.purple}Solving maze...#{TUI::Color.reset} ]\n\n" + puts + puts " [ #{TUI::Color.magenta}Solving maze...#{TUI::Color.reset} ]" + puts TUI::Cursor.save - end while @stack.last != @end_pos @@ -28,8 +29,8 @@ class MazeSolver if ENV["DEBUG"] == "visual" TUI::Cursor.restore - print @maze.to_s(" ", @stack) - print "\n\n" + puts @maze.to_s(" ", @stack) + puts puts " Stack size: #{@stack.length}" puts " Current algorithm: Depth-first search" end |