adds game
This commit is contained in:
parent
4496ba0811
commit
50e4712545
24 changed files with 528 additions and 0 deletions
19
tunnel.py
Normal file
19
tunnel.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from queue import Queue
|
||||
from enemy import *
|
||||
|
||||
|
||||
class Tunnel:
|
||||
def __init__(self):
|
||||
self.next_step = Empty()
|
||||
self.contents = Queue()
|
||||
for i in range(15): self.contents.put(Empty())
|
||||
print(self.contents.qsize())
|
||||
|
||||
def append_step(self, step):
|
||||
self.contents.get()
|
||||
self.contents.put(self.next_step)
|
||||
self.next_step = step
|
||||
|
||||
def get_as_str(self) -> str:
|
||||
result = [i.char for i in self.contents.queue]
|
||||
return "".join(result)
|
Loading…
Add table
Add a link
Reference in a new issue