21 lines
450 B
Python
21 lines
450 B
Python
'''
|
|
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())
|