Fixed some issues related to threading in game clock by using a queue

This commit is contained in:
2021-09-30 10:51:49 -05:00
parent 7bfc404413
commit fd6eb64232
10 changed files with 139 additions and 80 deletions

View File

@@ -1,12 +1,19 @@
module TAC
class PracticeGameClock
class RemoteProxy
attr_reader :queue
def initialize(window)
@window = window
@queue = []
@callbacks = {}
end
def enqueue(&block)
@queue << block
end
def register(callback, method)
@callbacks[callback] = method
end