Add small world test

This commit is contained in:
Anton Vakhrushev
2019-10-03 16:32:01 +03:00
parent 2df6b2f3ee
commit 6404a6e519
5 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,5 @@
require "./resources"
class World
property ts : Int32
@ -15,7 +17,6 @@ class World
def push(command : Command)
dur = command.start(self)
done_at = @ts + dur
printf "world : %d : plan `%s` at %d\n", @ts, typeof(command), done_at
@tasks.push(done_at, command)
end
@ -28,7 +29,6 @@ class World
command = item.command
@ts = item.ts
command.finish(self)
printf "world : %d : finish `%s`\n", @ts, typeof(command)
end
end
end