summaryrefslogtreecommitdiffstats
path: root/CLI/ruby/bin/game-of-life
diff options
context:
space:
mode:
Diffstat (limited to 'CLI/ruby/bin/game-of-life')
-rwxr-xr-xCLI/ruby/bin/game-of-life8
1 files changed, 5 insertions, 3 deletions
diff --git a/CLI/ruby/bin/game-of-life b/CLI/ruby/bin/game-of-life
index 16dc0fa..08dbeca 100755
--- a/CLI/ruby/bin/game-of-life
+++ b/CLI/ruby/bin/game-of-life
@@ -8,7 +8,7 @@ class CLI < Thor
map %w[-v --version] => :version
desc "--version, -v", "Prints the Game of Life version information"
def version
- puts "Game of Life version #{GameOfLife::VERSION}"
+ print "Game of Life version #{GameOfLife::VERSION}"
end
default_task :start
@@ -50,8 +50,10 @@ end
begin
CLI.start(ARGV)
rescue SystemExit, Interrupt
- "Do nothing when user exits with Interrupt (CMD/Ctrl + C)"
+ # Print Seed/File used in previous run when user exits with Interrupt (CMD/Ctrl + C)
+ print "\e[?1049l"
+ print "#{GameOfLife::BANNER}\n\e[0m"
rescue NotImplementedError, GameOfLife::Error => e
- puts e.message
+ print e.message
exit(-1)
end