feat: add backend for multiplayer support
This commit is contained in:
20
frontend/main.py
Normal file
20
frontend/main.py
Normal file
@@ -0,0 +1,20 @@
|
||||
'''
|
||||
Tetris 101:
|
||||
https://strategywiki.org/wiki/Tetris/Getting_Started
|
||||
https://tetris.com/play-tetris
|
||||
'''
|
||||
import asyncio
|
||||
from tetri5.game import Game
|
||||
from tetri5.util import ConfigurationManager
|
||||
|
||||
async def run_game():
|
||||
ConfigurationManager.init()
|
||||
Game.init()
|
||||
|
||||
while True:
|
||||
Game.update()
|
||||
Game.draw()
|
||||
await asyncio.sleep(0) # yield control to browser
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(run_game())
|
||||
Reference in New Issue
Block a user