Add screen clearing

This commit is contained in:
Anton Vakhrushev 2019-10-06 12:28:02 +03:00
parent 82709bde69
commit d1e549dacd

View File

@ -47,6 +47,7 @@ def normalize_command(cmd)
cmd.downcase.gsub(/\s+/, ' ').strip
end
printf "\u{001b}[2J"
loop do
printf "In > "
cmd = read_line()
@ -54,8 +55,10 @@ loop do
if norm == "exit"
break
end
printf "\u{001b}[2J"
current_time = Time.local.to_unix
world.run current_time
printf "Now: %s\n\n", Time.unix(world.ts).to_local.to_s
router.handle cmd
printf "\n"
end