Add error handling

This commit is contained in:
Anton Vakhrushev 2019-10-08 16:09:04 +03:00
parent 821a875380
commit f1c36ecc40

View File

@ -120,6 +120,10 @@ loop do
printf "\u{001b}[2J" printf "\u{001b}[2J"
current_time = Time.local.to_unix current_time = Time.local.to_unix
world.run current_time world.run current_time
router.handle cmd begin
router.handle cmd
rescue Game::NotEnoughtResources
printf ">>> Not enought resources <<<\n"
end
printf "\n" printf "\n"
end end