add async multi-client unit tests (#25)

* add class method to create player instance from dict

* update server code to use changes to player interface

* update gitignore

* update requirements

* add join action

* add client class

* add lobby class

* add new server implementation

* backup old server implementation

* test for player names in join action

* remove print statement

* add gamestate to dict method

* complete join action unit test

* move actions to their own file

* check if websocket is none before sending a message

* only toggle ready if client is a player

* remove old code

* move test utiliy wrapper and classes into separate module

* add toggle ready method and return correct gamestate response

* fix async test methods for join and toggle ready

* add script to start the autobeerpong server

* remove old files

* remove print statement

* remove unused imports and print statements

* check broadcast responses using assertEqual

* update README

* Add formatting to frontend (#27)

* update README

---------

Co-authored-by: Lucas Habersaat <lucas@habersaat.ch>
This commit is contained in:
Denisandlucas authored and GitHub committed 2026-01-11 19:33:54 +01:00
1 parent d4bb9b195f
commit 01211f6243
13 files changed
+377 -300

No files matched your search

+7
View File
@@ -3,3 +3,10 @@ A beer pong auto battler with stupid people.
## Frontend
To run the front-end, go into `src/frontend` and run: `npm install && npm run dev`.
## Backend
To setup the Python environment go into `src/backend` and run: `python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt`
To start the server run `python run_server.py`.
To execute the unit tests run `python -m unittest`.