Add screen clearing
This commit is contained in:
parent
82709bde69
commit
d1e549dacd
@ -47,6 +47,7 @@ def normalize_command(cmd)
|
|||||||
cmd.downcase.gsub(/\s+/, ' ').strip
|
cmd.downcase.gsub(/\s+/, ' ').strip
|
||||||
end
|
end
|
||||||
|
|
||||||
|
printf "\u{001b}[2J"
|
||||||
loop do
|
loop do
|
||||||
printf "In > "
|
printf "In > "
|
||||||
cmd = read_line()
|
cmd = read_line()
|
||||||
@ -54,8 +55,10 @@ loop do
|
|||||||
if norm == "exit"
|
if norm == "exit"
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
printf "\u{001b}[2J"
|
||||||
current_time = Time.local.to_unix
|
current_time = Time.local.to_unix
|
||||||
world.run current_time
|
world.run current_time
|
||||||
|
printf "Now: %s\n\n", Time.unix(world.ts).to_local.to_s
|
||||||
router.handle cmd
|
router.handle cmd
|
||||||
printf "\n"
|
printf "\n"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user