* add method to update server state
* add draft test match unit test class
* add join response message class
* add lobby state message class
* add spectator raw type
* add start match json schema
* add start match message class
* add test client manager class
* change client to return server responses as python classes
* add start match test method
* adapt old unit tests to use python message classes
* shortcut two players join and ready protocol
* fix wrong imports
* add message to assertion
* make broadcast function send message provided as argument
* add match state message class
* add match state json schema
* add match utility class
* add match state message class
* extend test function with match state check
* remove print statement
* add missing match schemas to frontend and add id properties
* make state keys unique
* fix MockSocket
* add basic match history funtionality
* use Prettier formatter
* fix typehint error
* add jsonschema module
* remove unused files
* small refactoring
* remove hardcoded host and port arguments
* remove hardcoded host and server arguments
* add direct response flag and to raw methods
* fix config lookup
* fix is players full method
* use config singleton for server host and port arguments
* add join message schema
* move testclient module
* move client tast module
* add python typehint module
* rename as_dict method to as_raw
* delete message_raw file
* add client state module
* add more type modules
* update json schemas
* add support for json schema validation
* add ready property to client
* add client getter and adder methods
* add repr dunder method
* fix client context not being updated with new client id
* add support for toggle ready message
* only toggle ready if client is player
* add toggle role message
* add rejoin message
* remove old files
* fix import
* remove unused import
* update unit tests to work with new message classes
* make schema dir not user configurable
* add config template
* rename client id getter method
* make client id none-ed
- Add json schemas for lobby and match state messages
- I did a few changes: Player and spectator each have a property client, which has the id/name.
- Add the separatio between lobby and match for messages
- Put the socket api into our own wrapper, to easily have a `MockSocket` to use in tests.
- Rename gamescene to matchscene.
- Add the url param `?mock=lobby` or `?mock=match` to jump to lobby or match with mocked data.
* add test method for toggle role action
* add max player detection in lobby during join
* add test method for max players check
* remove unused player module
* add missing client shutdown statements
* add process rejoin action method
* move client id logic to server class
* add test method for rejoin action
* extend test rejoin action method
* add comment to hacky solution
* 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>
* move application files into sub-folder
* rename app folder to autobeerpong
* fix import
* add unittest for join action
* add start server method
* add toggle role action unit test
* add toggle ready action unit test
* add wrapper to start and terminate server
* rename test lobby file
* close websocket after sending all actions
* add test rejoin test method
* fix key error
* answer to join call
* add is_disconnected flag
* add rejoin action
* fix missing json dumps
* fix old websocket object used after rejoin
* add disconnect, reconnect and send message logic
* use player object to send dataw
* (wip) add tests for disconnect
* fix abgelieferte gugus
* turn off readyness and enable spectator in disconnect function