sample websocket game.
you can play on this demo
- you can create room or join room
- when room has 2 player, you can start game
- when in your turn, you can draw card and play card (click button)
- when one player's HP <= 0, game is over
Warning: this is just a game prototype without any security protection measures. Please do not exchange personal privacy information on it.
example from (https://websockets.readthedocs.io/en/stable/howto/quickstart.html)
backend:
- game.py: game logic
- room.py: server
frontend:
- room.html: client
- style.css
- script.js
- install websockets module
pip install websockets
- launch server
python room.py
- open "room.html" in browser