Compare commits

...

1127 Commits

Author SHA1 Message Date
lars-winzer da891b46fd Merge pull request 'Add header project readme containing metadata about this project' (#351) from chore/readme-archive-metadata into main
Reviewed-on: #351
2026-05-29 18:44:18 +02:00
lars-winzer 17b4b13beb Add header project readme containing metadata about this project 2026-05-29 18:42:05 +02:00
Jona Walpert 7d759bc34b Merge branch 'chore/remove-sound-from-game-trailer' into 'main'
Legal: Remove sound from trailer as we don't want microsoft to sue us :)

See merge request cs108-fs26/Gruppe-13!194
2026-05-21 12:01:23 +00:00
Jona Walpert c79066b111 Legal: Remove sound from trailer as we don't want microsoft to sue us :) 2026-05-21 13:58:33 +02:00
Jona Walpert be7b528cbc Merge branch 'docs/MS6' into 'main'
Add: MS6 powerpoint presentation

See merge request cs108-fs26/Gruppe-13!193
2026-05-20 14:27:57 +00:00
Jona Walpert 1563bc3fa5 Add: MS6 powerpoint presentation 2026-05-20 16:18:23 +02:00
Lars Simon Winzer ea647b8cfc Merge branch 'chore/156-diary-entry-of-13th-of-may' into 'main'
Write diary entry of 13th of may

Closes #147 and #156

See merge request cs108-fs26/Gruppe-13!192
2026-05-17 23:01:26 +02:00
Lars Simon Winzer 706738d9a7 Docs: Write diary entry 2026-05-17 22:52:58 +02:00
Lars Simon Winzer 7de3af0cef Merge branch 'chore/155-write-qa-report-for-ms6' into 'main'
Add QA report with exported pdf and images

Closes #152, #151, and #155

See merge request cs108-fs26/Gruppe-13!191
2026-05-17 22:45:11 +02:00
Lars Simon Winzer 85a3af9047 Docs: Add QA report with exported pdf and images 2026-05-17 22:38:31 +02:00
Mathis Ginkel 537e8aa771 Merge branch 'feat/manual-fixup' into 'main'
Feat: Replacement of syntax that could not be displayed in the casono manual

See merge request cs108-fs26/Gruppe-13!190
2026-05-17 18:47:15 +00:00
Mathis Ginkel d869f81f1c Feat: markdown syntax that the html version could not display was replaced 2026-05-17 20:36:23 +02:00
Julian Kropff 144b5fa70e Merge branch 'feat/add-casono-domain' into 'main'
Add: casono website domain into Casono Browser

See merge request cs108-fs26/Gruppe-13!189
2026-05-17 15:44:59 +00:00
Julian Kropff 8843b63281 Add: casono website domain into Casono Browser 2026-05-17 17:40:40 +02:00
Julian Kropff ecdaf20ece Merge branch 'feat/casono-browser-file-search' into 'main'
Feat: Casono Browser file search

See merge request cs108-fs26/Gruppe-13!188
2026-05-17 15:10:48 +00:00
Julian Kropff 2d82dbdb14 Fix: search to find index.html. 2026-05-17 16:35:09 +02:00
Julian Kropff da65a0470c Fix: the Casono Browsers search algorithm for searching the manual and website files. 2026-05-17 16:08:11 +02:00
Mathis Ginkel 17ed897516 Merge branch 'feat/manual-improvement' into 'main'
Feat: Update casono-manual

See merge request cs108-fs26/Gruppe-13!187
2026-05-17 12:55:44 +00:00
Mathis Ginkel 1402a1231a Feat: update manual.html 2026-05-17 14:46:43 +02:00
Mathis Ginkel f9eb293460 Merge branch 'main' into feat/manual-improvement 2026-05-17 14:43:16 +02:00
Mathis Ginkel dfd0ae6a59 Merge remote-tracking branch 'origin/feat/manual-improvement' into feat/manual-improvement 2026-05-17 14:32:16 +02:00
Mathis Ginkel a4c138c461 Feat: replace gradle commands to start the game in the manual with commands to start the jar file 2026-05-17 14:30:00 +02:00
Mathis Ginkel f296bf272e Add: brings markdown file changes to manual.html 2026-05-17 14:30:00 +02:00
Mathis Ginkel 9d00b948c7 Add: description to change themes of the GameUI and change the description of the ChatUI 2026-05-17 14:30:00 +02:00
Mathis Ginkel d5b9f223f3 Add: manual section for ChatUI 2026-05-17 14:30:00 +02:00
Julian Kropff d5c833fa00 Fix: Casono Manual: avg -> svg 2026-05-17 14:30:00 +02:00
Julian Kropff 69cac803ad Docs: update Casono Manual 2026-05-17 14:30:00 +02:00
Mathis Ginkel cbef7c3888 Feat: replace gradle commands to start the game in the manual with commands to start the jar file 2026-05-17 14:26:45 +02:00
Julian Kropff 5df9a7ffc4 Merge branch 'feat/game-ui-optimization' into 'main'
Feat: Game UI optimization

See merge request cs108-fs26/Gruppe-13!186
2026-05-16 20:52:37 +00:00
Julian Kropff d11fea9c5d Fix: Apply Spotless 2026-05-16 22:47:30 +02:00
Julian Kropff 086394d25e Fix: Updating the pot when the winner is known. 2026-05-16 22:38:14 +02:00
Julian Kropff 4020b196cb Fix: A Better Method for Identifying the first Player of the Round. 2026-05-16 22:36:13 +02:00
Jona Walpert 3f168daf78 Merge branch 'feat/prohibit-name-change-text-instead-of-popup' into 'main'
Feat: Instead of a popup saying you are not allowed to change username while...

See merge request cs108-fs26/Gruppe-13!185
2026-05-16 20:33:50 +00:00
Jona Walpert 4760b55673 Feat: Instead of a popup saying you are not allowed to change username while the lobyb is still active, this commit changes the "Casono" Title to more or less the same message for 2 seconds and then switches back. This improves the quality of the UI drastically 2026-05-16 22:31:03 +02:00
Julian Kropff 35e30eec2f Fix: Call problem in Turn/River - the pot is no longer being updated. 2026-05-16 22:09:22 +02:00
Jona Walpert aef36f8a73 Merge branch 'fix/lobby-cleanup-blocked' into 'main'
Fix: Lobby cleanup got blocked by previous feature for rejoining lobby while game is still going

See merge request cs108-fs26/Gruppe-13!184
2026-05-15 13:40:45 +00:00
Jona Walpert a893418934 Fix: Lobby cleanup got blocked by previous feature for rejoining lobby while game is still going. 2026-05-15 15:37:55 +02:00
Julian Kropff b6c59a92a1 Merge remote-tracking branch 'origin/main' into feat/game-ui-optimization 2026-05-14 20:22:36 +02:00
Julian Kropff f77cf41cd5 Merge branch 'feat/outreach-landing-page-no-script' into 'main'
Add: noscript banner for Casono Browser with disabled JavaScript

See merge request cs108-fs26/Gruppe-13!183
2026-05-14 18:21:36 +00:00
Julian Kropff df2dc51acb Add: noscript banner for Casono Browser with disabled JavaScript 2026-05-14 20:05:13 +02:00
Julian Kropff 3dbedbb047 Fix: Casono Browser URL allowlist 2026-05-14 20:00:20 +02:00
Julian Kropff baccb15c17 Add: Casono Website and VS Code dev buttons in TaskbarController 2026-05-14 19:58:11 +02:00
Julian Kropff bfef83f7e7 Add: Casono Website and VS Code dev buttons in Taskbar fxml 2026-05-14 19:57:54 +02:00
Julian Kropff ea143e2a24 Fix: Apply Spotless 2026-05-14 19:24:59 +02:00
Julian Kropff 894515204c Merge remote-tracking branch 'origin/main' into feat/game-ui-optimization 2026-05-14 19:18:58 +02:00
Julian Kropff b030948cb6 Merge branch 'feat/outreach-landing-page' into 'main'
Add: Casono Website

See merge request cs108-fs26/Gruppe-13!182
2026-05-14 17:04:58 +00:00
Julian Kropff f78e9d8a25 Fix: table preview image 2026-05-14 18:51:04 +02:00
Julian Kropff 089aeb9419 Merge branch 'feat/chat-ui-style-optimization' into 'main'
Style: Update Chat UI themes

See merge request cs108-fs26/Gruppe-13!181
2026-05-14 16:42:30 +00:00
Julian Kropff 94613626d9 Style: Update Chat UI themes 2026-05-14 18:30:40 +02:00
Julian Kropff 3d0fca616a Fix: Harden GameClient command execution with exception handling 2026-05-14 18:05:05 +02:00
Julian Kropff 2f744a5558 Fix: Improve GameService action queue and concurrency handling 2026-05-14 18:02:07 +02:00
Julian Kropff 46919a064d Fix: Game UI action locking and improve taskbar controller responsiveness 2026-05-14 18:00:11 +02:00
Julian Kropff 310cb59fe6 Fix: Optimized Game UI rendering and controller responsiveness 2026-05-14 17:58:36 +02:00
Julian Kropff d57fd08b37 Fix: Improve Game UI update loop timing and prevent overlapping updates 2026-05-14 16:15:47 +02:00
Mathis Ginkel f0135ce6f4 Merge branch 'fix/140-chat-messages' into 'main'
Fix: special character only chat messages

Closes #140

See merge request cs108-fs26/Gruppe-13!180
2026-05-14 11:51:45 +00:00
Jona Walpert 09aca862ca Merge branch 'feat/f11-fullscreen-toggle' into 'main'
Feat: Add F11 fullscreen toggle

See merge request cs108-fs26/Gruppe-13!179
2026-05-14 11:48:01 +00:00
Jona Walpert a2212aa91c Merge branch 'feat/black-background-video-player' into 'main'
Feat: add black background to intro video player

See merge request cs108-fs26/Gruppe-13!178
2026-05-14 11:45:42 +00:00
Mathis Ginkel 121b20f24f Merge branch 'main' into feat/140-chat-messages 2026-05-14 11:46:43 +02:00
Mathis Ginkel 8790b06277 Fix: apostrophe-only messages are now prohibited 2026-05-14 11:44:41 +02:00
Jona Walpert bca9669703 Feat: Add F11 fullscreen toggle 2026-05-14 11:43:04 +02:00
Julian Kropff 09cc7e39c5 Feat: add black background to intro video player 2026-05-14 11:26:11 +02:00
Jona Walpert 0aae4221e2 Deleted placeholder images 2026-05-14 11:19:55 +02:00
Jona Walpert f15fed2243 Merge branch 'feat/disable-esc-to-leave-message' into 'main'
Feat: Disable "ESC to leave fullscreen" message

See merge request cs108-fs26/Gruppe-13!177
2026-05-13 21:59:03 +00:00
Jona Walpert cea21093c4 Feat: Disable "ESC to leave fullscreen" message 2026-05-13 23:56:19 +02:00
Jona Walpert e9dc8f1586 Merge branch 'feat/141-intro-video-fullscreen-startup' into 'main'
Feat: Add intro video

See merge request cs108-fs26/Gruppe-13!176
2026-05-13 21:49:08 +00:00
Jona Walpert 56421b4c15 Feat: Add intro video 2026-05-13 23:46:26 +02:00
Jona Walpert 87023b7238 Merge branch 'fix/143-client-rejoin-flow' into 'main'
fix: add client leave-lobby rejoin flow

Closes #143

See merge request cs108-fs26/Gruppe-13!175
2026-05-13 21:33:11 +00:00
Jona Walpert 6bd0ed6064 Merge branch 'fix/143-block-username-during-active-game' into 'main'
fix: block username changes during active games

See merge request cs108-fs26/Gruppe-13!174
2026-05-13 21:29:48 +00:00
Jona Walpert b58eb656b3 fix: add client leave-lobby rejoin flow 2026-05-13 23:25:57 +02:00
Jona Walpert c10dc81ef3 fix: block username changes during active games 2026-05-13 23:25:11 +02:00
Jona Walpert 0097da6bdc Merge branch 'feat/143-leave-lobby-command' into 'main'
Feat: Add leave-lobby command

See merge request cs108-fs26/Gruppe-13!172
2026-05-13 21:17:57 +00:00
Jona Walpert 448f2ca472 Merge branch 'main' into 'feat/143-leave-lobby-command' 2026-05-13 23:12:44 +02:00
Jona Walpert 01831fadc0 Merge branch 'feat/143-lobby-absent-player-tracking' into 'main'
Feat: Track absent players in lobbies

See merge request cs108-fs26/Gruppe-13!173
2026-05-13 21:11:28 +00:00
Jona Walpert 1d5d608a18 Feat: Track absent players in lobbies
- Add absent player tracking to Lobby with leave/restore methods
- Implement rejoin logic in LobbyManager to restore absent players
- Add game-end callback mechanism to GameController and Lobby
- Extend LobbyEventListener with onGameEnded event
2026-05-13 23:08:38 +02:00
Jona Walpert cd8aa9e709 Feat: Add leave-lobby command 2026-05-13 23:00:06 +02:00
Jona Walpert 9706e140ac Merge branch 'feat/133-add-sounds-to-game' into 'main'
Feat: Adds sounds to game

Closes #138

See merge request cs108-fs26/Gruppe-13!171
2026-05-13 19:38:53 +00:00
Jona Walpert 4afb96ee7a Merge branch 'main' into 'feat/133-add-sounds-to-game' 2026-05-13 21:21:38 +02:00
Julian Kropff 39b068a5cf Merge branch 'feat/game-ui-profile-picture' into 'main'
Add: Profile Pictures

See merge request cs108-fs26/Gruppe-13!170
2026-05-13 19:18:22 +00:00
Jona Walpert c5b92d9ba8 Feat: Add gmaeplay video 2026-05-13 21:15:21 +02:00
Jona Walpert 3314060eb1 Feat: Add team member pcitures and profile links 2026-05-13 21:12:56 +02:00
Jona Walpert 6aaaaa55a3 Add: Trailer video 2026-05-13 21:09:11 +02:00
Julian Kropff d687ed8238 Merge branch 'feat/ui-new-rug' into 'main'
Add: mew wallpapers

See merge request cs108-fs26/Gruppe-13!169
2026-05-13 19:04:38 +00:00
Julian Kropff 6981a1fc0b Add: Standard Wood theme 2026-05-13 20:58:05 +02:00
Jona Walpert d2d83edfb2 Merge branch 'ci/add-javafx-media-module' into 'main'
Ci: Add javafx.media module to support video playback

See merge request cs108-fs26/Gruppe-13!168
2026-05-13 17:25:50 +00:00
Julian Kropff edcee79a10 Style: The new wallpapers have been added to the UI 2026-05-13 18:57:26 +02:00
Julian Kropff 6246615655 Fix: The background image has been made brighter 2026-05-13 18:55:55 +02:00
Julian Kropff cf712a46c0 Add: new background images 2026-05-13 18:32:44 +02:00
Julian Kropff 59f1763926 Add: profile picture loading in PlayerStatusController 2026-05-13 17:55:37 +02:00
Julian Kropff aad00bda0b Style: add playerProfileImage ImageView to Playerstatus fxml 2026-05-13 17:52:18 +02:00
Julian Kropff 903624e968 Add: Profile Pictures 2026-05-13 17:48:40 +02:00
Jona Walpert 5294615aca Ci: Add javafx.media module to support video playback 2026-05-13 15:49:42 +02:00
Jona Walpert d474d85b41 Merge branch 'feat/137-Save-money-in-highscore-list' into 'main'
Feat: Money is now saved in the Higshcore list.

Closes #137

See merge request cs108-fs26/Gruppe-13!167
2026-05-13 11:06:31 +00:00
Lars Simon Winzer baa1d51a1f Merge branch 'feat/60-shorten-logger-name' into 'main'
Short logger names to reduce visual clutter in log output

Closes #60

See merge request cs108-fs26/Gruppe-13!166
2026-05-12 19:06:56 +02:00
Jona Walpert fedaa87202 Style: Fixed spotless error 2026-05-12 16:02:39 +02:00
Jona Walpert 34bac0adb6 Feat: Money is now saved in the Higshcore list.
Furthermore if two people win the pot both will get added to the highscore list
2026-05-12 16:00:38 +02:00
Lars Simon Winzer 0be59681e4 Refactor: Short logger name for application entry point 2026-05-12 12:59:52 +02:00
Lars Simon Winzer 28aad75930 Refactor: Short logger names for classes in client-side session package 2026-05-12 12:59:32 +02:00
Lars Simon Winzer eefcd10135 Refactor: Short logger names for classes in server-side packages 2026-05-12 12:59:13 +02:00
Julian Kropff b7328769a9 Merge branch 'feat/game-ui-glass-theme' into 'main'
Add: light glass theme for Game UI

See merge request cs108-fs26/Gruppe-13!165
2026-05-11 16:49:53 +00:00
Julian Kropff c8e437f8f0 Fix: checkstyle 2026-05-11 18:45:29 +02:00
Julian Kropff 87971103b8 Add: light glass theme for Game UI 2026-05-11 18:38:49 +02:00
Mathis Ginkel 145d6e7d31 Add: brings markdown file changes to manual.html 2026-05-10 22:14:09 +02:00
Mathis Ginkel 426a108b54 Add: description to change themes of the GameUI and change the description of the ChatUI 2026-05-10 21:56:27 +02:00
Julian Kropff dd1a9a4e23 Merge branch 'feat/game-ui-optimization' into 'main'
Game UI Optimisation

See merge request cs108-fs26/Gruppe-13!164
2026-05-10 18:54:22 +00:00
Julian Kropff f60d17edfe Fix: typo in Taskbar fxml 2026-05-10 20:42:46 +02:00
Mathis Ginkel b30af0c212 Fix: changed descriptive text of ChatUI elements 2026-05-10 17:33:42 +02:00
Mathis Ginkel 3be6fb0706 Add: manual section for ChatUI 2026-05-10 17:28:41 +02:00
Mathis Ginkel 47475dc4d3 Style: Apply Spotless 2026-05-10 16:49:15 +02:00
Mathis Ginkel 351ac06aab Test: Make sure that the conversion of response lines into parameters is executed correctly 2026-05-10 16:45:46 +02:00
Mathis Ginkel 88d37bca49 Fix: Messages with only special characters can be sent in the chat 2026-05-10 16:43:41 +02:00
Julian Kropff 1a96d5fb23 Fix: You should only be able to bet the minimum from your last bet on the Flop, not on the Turn or River from the second-to-last player. 2026-05-09 17:27:55 +02:00
Julian Kropff 2cfc40543a Fix: Apply Spotless 2026-05-08 16:39:02 +02:00
Julian Kropff 9f5625b2f6 Add: Notebook (Tips) box for help 2026-05-08 16:34:17 +02:00
Julian Kropff 2f19fff618 Feat: Improving the Game UI and implementing new Features:
- Improve dealer chip Rendering.
- Improve pot Rendering.
- Uses names instead of IDs as identifiers.
- Users are displayed one after another as they enter the Game UI.
- Correct order of opponents <- B <-> S <-> D <-> O -> in the Game UI.
- The boxes for the opponents should have a working hover effect.
- Improve the rendering of the table text.
- Remove hover animations from cards and the pot for improved handling and a more stable Game UI.
2026-05-08 16:27:42 +02:00
Julian Kropff b63ce096fa Style: the boxes for the opponents should have a working hover effect. 2026-05-08 15:08:13 +02:00
Julian Kropff b304fa04ed Fix: correct kicker logic and split pot evaluation
- Fixed kicker calculation for ties.
- Refactored game engine to return a list of winners.
- Enabled support for multiple winners in split pot scenarios.
2026-05-08 15:05:39 +02:00
Julian Kropff 394cdf4ea1 Remove animations from cards and the pot to improve usability, make the game interface more stable, and enhance the glass themes 2026-05-08 12:57:32 +02:00
Julian Kropff 3100e4008d Add: settings with theme options: Default, Dark, and Glass 2026-05-08 12:54:31 +02:00
Julian Kropff 4cf88a9a2f Add: tips and settings boxes to Game Ui fxml 2026-05-07 16:28:33 +02:00
Julian Kropff e4707bd6ee Style: improve help button in taskbar fxml 2026-05-07 16:25:45 +02:00
Julian Kropff f843adc93b Add: settings fxml for theme switching 2026-05-07 16:23:25 +02:00
Julian Kropff bddd9658cf Add: notebook fxml for tips 2026-05-07 16:20:53 +02:00
Julian Kropff 217209997f Style: fix Game Ui default theme 2026-05-07 16:15:54 +02:00
Julian Kropff 712ba913e7 Style: add glass theme 2026-05-07 16:14:37 +02:00
Julian Kropff 6f8c43397c Style: add dark theme 2026-05-07 16:13:34 +02:00
jk 479fab6557 Add: new wallpaper for the glass theme 2026-05-07 16:09:45 +02:00
Jona Walpert 5a3c47660d Refactor: rewrite lamdba execution to more elegant version
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 11:44:57 +02:00
Jona Walpert be8e46d356 Style: Fix spotless checkStyle
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 11:41:04 +02:00
Jona Walpert ba1249bf93 Feat: Add button cklick and card draw sounds to gameUI 2026-04-30 11:37:22 +02:00
Jona Walpert cf52d293a4 Feat: Add sounds to chat UI 2026-04-30 11:35:34 +02:00
Jona Walpert b397478337 Feat: Add button click sounds to Lobby UI 2026-04-30 11:34:49 +02:00
Jona Walpert 0d896d6aad Add: Add sound manager to play sounds 2026-04-30 11:33:39 +02:00
Jona Walpert ef1f3c20b6 Feat: Add button cklick and card draw sound 2026-04-30 11:31:51 +02:00
Julian Kropff 61030c3528 Fix: Casono Manual: avg -> svg 2026-04-27 09:45:44 +02:00
Julian Kropff 4ce9021e57 Docs: update Casono Manual 2026-04-27 09:41:17 +02:00
Lars Simon Winzer 4f1624a30b Merge branch 'feat/136-write-unit-tests-for-commandparserdispatcher' into 'main'
Unit tests for CommandParserDispatcher

Closes #136

See merge request cs108-fs26/Gruppe-13!163
2026-04-27 01:09:29 +02:00
Lars Simon Winzer 363a0ed895 Test: Add unit tests for CommandParserDispatcher 2026-04-27 01:04:45 +02:00
Lars Simon Winzer ecf692fbcd Merge branch 'feat/135-write-unit-tests-for-eventbus' into 'main'
Unit tests for EventBus

Closes #135

See merge request cs108-fs26/Gruppe-13!162
2026-04-27 00:55:43 +02:00
Mathis Ginkel 4fd036173f Merge branch 'feat/chat-tests' into 'main'
Feat/chat tests

See merge request cs108-fs26/Gruppe-13!161
2026-04-26 22:52:30 +00:00
Lars Simon Winzer d36a78eee4 Style: Change order and visibility of nested class to private 2026-04-27 00:50:44 +02:00
Mathis Ginkel 8484f731a8 Style: Apply Spotless 2026-04-27 00:46:31 +02:00
Lars Simon Winzer b158be26e3 Style: Add 'test' prefix to methods 2026-04-27 00:45:53 +02:00
Mathis Ginkel 59af75a75c Merge branch 'main' into feat/chat-tests 2026-04-27 00:42:44 +02:00
Lars Simon Winzer 823b406fe6 Test: Add unit tests for EventBus 2026-04-27 00:41:17 +02:00
Lars Simon Winzer 71f2d3c2ce Merge branch 'feat/134-write-unit-tests-for-sessiondisconnectjob' into 'main'
Unit tests for SessionDisconnectJob

Closes #134

See merge request cs108-fs26/Gruppe-13!160
2026-04-27 00:38:34 +02:00
Lars Simon Winzer eb2b209e91 Test: Add unit tests for SessionDisconnectJob 2026-04-27 00:20:54 +02:00
Mathis Ginkel 5663807e29 Style: Fixing some linter warnings in ChatModel and Message classes 2026-04-27 00:17:34 +02:00
Mathis Ginkel fe83057049 Merge branch 'main' into feat/chat-tests
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/chatui/ChatBoxController.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/chatui/ChatViewController.java
2026-04-27 00:07:26 +02:00
Mathis Ginkel e9b40e9d04 Style: Apply Spotless 2026-04-26 23:54:15 +02:00
Mathis Ginkel b7f5a268e3 Feat: Remove chatui directory in gameuicomponents 2026-04-26 23:51:45 +02:00
Mathis Ginkel 619f6eef84 Merge branch 'feat/chat-visual-improvement' into 'main'
Feat/chat visual improvement

Closes #107

See merge request cs108-fs26/Gruppe-13!159
2026-04-26 21:50:55 +00:00
Mathis Ginkel d8d6dbb34f Style: fixing some linter warnings in chat ui classes 2026-04-26 21:45:25 +00:00
Mathis Ginkel efd91fbe5f Style: Apply Spotless 2026-04-26 21:45:25 +00:00
Mathis Ginkel ad2accfced Fix: Reopen whisper chat when previously closed 2026-04-26 21:45:25 +00:00
Mathis Ginkel 4c35596f19 Feat: Change look of chat box 2026-04-26 21:45:25 +00:00
Mathis Ginkel 659e606fb4 Merge branch 'main' into feat/chat-tests 2026-04-26 23:37:36 +02:00
Mathis Ginkel 5358309e1a Test: Add test for ChatController 2026-04-26 23:36:50 +02:00
Julian Kropff dc2b3e05d9 Merge branch 'feat/game-ui-tests' into 'main'
Add: Game UI Taskbar tests

See merge request cs108-fs26/Gruppe-13!158
2026-04-26 21:36:17 +00:00
Julian Kropff d6ad60d6a7 Fix: radical overhaul of Game UI tests to fix CI pipeline failures 2026-04-26 23:27:53 +02:00
Julian Kropff ddb3e221ac Fix: radical overhaul of Game UI tests to fix CI pipeline failures 2026-04-26 23:04:45 +02:00
Julian Kropff 5d0a9b9c25 Merge branch 'feat/manual' into 'main'
Feat/manual

Closes #130

See merge request cs108-fs26/Gruppe-13!157
2026-04-26 20:45:05 +00:00
Julian Kropff 52ad32a100 Fix: radical overhaul of Game UI tests to fix CI pipeline failures 2026-04-26 22:35:45 +02:00
Julian Kropff 822d9a0e1e Fix: Checkstyle 2026-04-26 21:57:14 +02:00
Mathis Ginkel 216c15e825 Merge branch 'refs/heads/main' into feat/chat-visual-improvement 2026-04-26 21:46:52 +02:00
Julian Kropff 30927d471e Add: Game UI test: Ensures FXML loads and controller initializes without errors. 2026-04-26 21:42:47 +02:00
Julian Kropff 86ab82ebfd Add: Game UI Taskbar tests:
- input validation behavior
- UI state updates based on game state
- correct enabling/disabling of action buttons
2026-04-26 21:34:24 +02:00
Julian Kropff 6a06369d94 Fix: Checkstyle 2026-04-26 21:26:45 +02:00
Lars Simon Winzer 48bfef5fcb Merge branch 'chore/133-write-diary' into 'main'
Diary entry covering current state of unit tests and planned structural changes approaching MS6

Closes #132 and #133

See merge request cs108-fs26/Gruppe-13!155
2026-04-26 21:22:16 +02:00
Lars Simon Winzer a6e98b2453 Docs: Extend diary readme by newly added diary entry
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 21:16:59 +02:00
Lars Simon Winzer 54a3f1e29d Docs: Diary entry covering current state of unit tests and prospective changes
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 21:14:37 +02:00
Mathis Ginkel 1b18affd57 Fix: Reopen whisper chat when previously closed 2026-04-26 20:25:31 +02:00
Julian Kropff 5fc3f315fc Docs: update Casono Manual 2026-04-26 20:08:43 +02:00
Julian Kropff ac9396cfb2 Fix: improve code block rendering in Casono Markdown Render Engine 2026-04-26 20:07:07 +02:00
Julian Kropff c6772d6f89 Docs: add images for manual 2026-04-26 20:04:01 +02:00
Lars Simon Winzer d86b9b5838 Merge branch 'feat/131-write-unit-tests-for-responseencoder' into 'main'
Unit tests for ResponseEncoder

Closes #131

See merge request cs108-fs26/Gruppe-13!154
2026-04-26 19:16:26 +02:00
Lars Simon Winzer d91ee5b04f Test: Add unit tests for ResponseEncoder 2026-04-26 19:10:11 +02:00
Lars Simon Winzer 6b5d521ab9 Merge branch 'feat/129-write-unit-tests-for-responsebody-and-responsebodybuilder' into 'main'
Unit tests for ResponseBodyBuilder

Closes #129

See merge request cs108-fs26/Gruppe-13!153
2026-04-26 18:35:48 +02:00
Lars Simon Winzer 4ad9ae08c5 Test: Add unit tests for ResponseBodyBuilder 2026-04-26 18:15:53 +02:00
Julian Kropff 1107542c54 Fix: Bug fix so that the 3000 cap does not apply to every Phase 2026-04-26 18:09:03 +02:00
Julian Kropff 2ad99d8732 Merge branch 'feat/game-ui-optimation' into 'main'
Feat: New Game UI Features and bug fixed

See merge request cs108-fs26/Gruppe-13!152
2026-04-26 15:52:40 +00:00
Julian Kropff d791e9b2d1 Merge branch 'main' into feat/game-ui-optimation 2026-04-26 17:43:37 +02:00
Lars Simon Winzer 3cd1e6925e Merge branch 'feat/128-unit-tests-for-requestparameteraccessor' into 'main'
Unit tests for RequestParameterAccessor

Closes #128

See merge request cs108-fs26/Gruppe-13!151
2026-04-26 17:19:30 +02:00
Lars Simon Winzer a7e4411cd0 Test: Add unit tests for RequestParameterAccessor 2026-04-26 17:13:11 +02:00
Julian Kropff bf979ab391 Fix: rename button names 2026-04-26 17:05:05 +02:00
Mathis Ginkel 588bb1f312 Merge branch 'main' into feat/chat-visual-improvement 2026-04-26 16:58:45 +02:00
Julian Kropff fb68ecc777 Feat: New Game UI Features:
- Call, Raise, Fold, Bet and Winner action are displayed in the Lobby Chat.
- More security features in the Game UI
- The Game UI is now even more Texas Hold'em friendly
2026-04-26 16:58:23 +02:00
Julian Kropff 8ca41c5ab4 Fix: Checkstyle 2026-04-26 16:51:43 +02:00
Julian Kropff 6422e6c924 Add: new welcome message in the Game UI 2026-04-26 16:21:26 +02:00
Julian Kropff 404bf6379c Add: the new Dealer Icon in PlayerStatusController 2026-04-26 16:20:26 +02:00
Julian Kropff d46bd8de7e Add: New Dealer Icon 2026-04-26 16:17:58 +02:00
Julian Kropff c55a9eace6 Add: Block file downloads in Casono Browser 2026-04-26 16:16:28 +02:00
Julian Kropff b3eaa64cd7 Add: Casono Logo to popups 2026-04-25 18:36:35 +02:00
Julian Kropff ab4f60a74f Add: hint for first player to act in preflop 2026-04-25 18:34:18 +02:00
Julian Kropff 4f9e9a0e9a Fix: Checkstyle 2026-04-25 16:26:54 +02:00
Julian Kropff c31f0048ee Style: fixes in FXML and CSS for Game UI 2026-04-25 15:02:02 +02:00
Julian Kropff 0f5ddfda0c Add: taskbar image for Casono manual 2026-04-25 14:58:51 +02:00
Julian Kropff 09f8ddf123 Add: Casono manual with integrated Markdown renderer 2026-04-25 14:57:05 +02:00
Julian Kropff c11201479b Add: visual indicator for current player in Game UI 2026-04-25 14:54:46 +02:00
Lars Simon Winzer 5ded42abe6 Merge branch 'fix/126-missing-key-is-not-detected-by-tokenclassifier' into 'main'
Detect missing keys while classifying tokens

Closes #126

See merge request cs108-fs26/Gruppe-13!150
2026-04-25 14:33:12 +02:00
Lars Simon Winzer 572b66889d Test: Add test for missing key before separator in TokenClassifier 2026-04-25 14:27:42 +02:00
Lars Simon Winzer 89fd6aef05 Fix: Detect missing key when validating separator 2026-04-25 14:26:22 +02:00
Julian Kropff 6e640f7fde Add: Casono manual via help button and taskbar dragging with screen boundary clamping and scaling 2026-04-25 14:19:47 +02:00
Julian Kropff 7a6c876017 Add: secure local HTML file loading in Casono Browser and website autocompletion 2026-04-25 14:05:31 +02:00
Lars Simon Winzer 22d742d614 Merge branch 'feat/4-create-unit-tests-for-server-side-tokenizer' into 'main'
Unit tests for Tokenizer and TokenClassifier

Closes #4

See merge request cs108-fs26/Gruppe-13!149
2026-04-25 13:58:52 +02:00
Julian Kropff 71d48d148b Fix: delay lobby cleanup to ensure winner is displayed on all Clients
Refs #125
2026-04-25 13:50:18 +02:00
Julian Kropff 5c0f3a7c86 Add: persistence guard for hand winner to prevent double saving
Refs #125
2026-04-25 13:43:18 +02:00
Lars Simon Winzer 2190fccd8f Style: Apply Spotless 2026-04-25 13:28:34 +02:00
Lars Simon Winzer 4bfb59f234 Test: Unit tests for TokenClassifier
Co-authored-by: Copilot <copilot@github.com>
2026-04-25 13:28:10 +02:00
Lars Simon Winzer d49f18c3aa Test: Unit tests for Tokenizer 2026-04-25 10:44:09 +02:00
Jona Walpert d4a3ebb487 Merge branch 'refactor/124-lobby-cleanup-job' into 'main'
Refactor: Add LobbyCleanupJob for periodic expired lobby cleanup

Closes #124

See merge request cs108-fs26/Gruppe-13!148
2026-04-24 13:20:45 +00:00
Jona Walpert 3cabe06fb0 Merge branch 'main' into 'refactor/124-lobby-cleanup-job' to prevent merge conflicts 2026-04-24 15:15:29 +02:00
Mathis Ginkel ebca653ab4 Merge remote-tracking branch 'origin/feat/chat-visual-improvement' into feat/chat-visual-improvement 2026-04-24 14:17:04 +02:00
Mathis Ginkel 9df48478f3 Feat: Change look of chat box 2026-04-24 14:16:55 +02:00
Jona Walpert 9023263b01 Refacor: Schedule LobbyCleanupJob instead of cleanup lambda
Refs #124

Co-authored-by: Copilot <copilot@github.com>
2026-04-24 14:16:12 +02:00
Jona Walpert c04d4fca76 Refactor: Add LobbyCleanupJob for periodic expired lobby cleanup
- isolate failures per lobby during cleanup
- notify connected sessions about closed lobbies
Refs #124

Co-authored-by: Copilot <copilot@github.com>
2026-04-24 14:14:59 +02:00
Mathis Ginkel d3d72bd5b4 Merge branch 'feat/chat-integration' into 'main'
Feat: Add chat box into the game screen

See merge request cs108-fs26/Gruppe-13!147
2026-04-24 12:14:16 +00:00
Mathis Ginkel 4a3c885b68 Style: Apply Spotless 2026-04-24 14:04:12 +02:00
Mathis Ginkel 571c616ce9 Merge remote-tracking branch 'origin/feat/chat-integration' into feat/chat-integration 2026-04-24 13:45:15 +02:00
Mathis Ginkel 01ecbb0497 Style: Apply Spotless 2026-04-24 13:45:02 +02:00
Julian Kropff 5e91cefabb Fix: whisper chat not working in game UI 2026-04-24 13:44:38 +02:00
Julian Kropff 0f4d048b76 Fix: Chat UI initialization improved in Game UI 2026-04-24 13:44:18 +02:00
Mathis Ginkel b1d099f102 Feat: Add load method to restore all chat message of a chat
Refs #107
2026-04-24 13:43:40 +02:00
Mathis Ginkel 40e558be18 Feat: Add chat box into the game screen
Refs #107
2026-04-24 13:40:44 +02:00
Mathis Ginkel 277b776fec Feat: Add chat box into game ui 2026-04-24 13:38:52 +02:00
Mathis Ginkel 88b797ba1d Feat: Add field ChatController to LobbyButtonGridManager 2026-04-24 13:37:12 +02:00
Mathis Ginkel 07c00275fd Merge remote-tracking branch 'origin/feat/chat-integration' into feat/chat-integration 2026-04-24 13:27:17 +02:00
Mathis Ginkel 1d4cf2d846 Style: Apply Spotless 2026-04-24 13:26:57 +02:00
Julian Kropff c2d0af03b7 Fix: whisper chat not working in game UI 2026-04-24 13:26:57 +02:00
Julian Kropff 48476a67f3 Fix: Chat UI initialization improved in Game UI 2026-04-24 13:26:57 +02:00
Julian Kropff 6471749133 Fix: correct layout layering in Game UI 2026-04-24 13:26:57 +02:00
Mathis Ginkel 826e58644a Feat: Add load method to restore all chat message of a chat
Refs #107
2026-04-24 13:26:57 +02:00
Mathis Ginkel 67a0f237e6 Feat: Forward ChatController to all instances where its needed
Refs #107
2026-04-24 13:26:57 +02:00
Mathis Ginkel 2a03571cd1 Feat: Add chat box into the game screen
Refs #107
2026-04-24 13:26:57 +02:00
Mathis Ginkel 7eafaba65a Feat: Add chat box into game ui 2026-04-24 13:26:57 +02:00
Mathis Ginkel 69fc00a3b2 Feat: Add field ChatController to LobbyButtonGridManager 2026-04-24 13:26:57 +02:00
Jona Walpert ca65655443 Merge branch 'refactor/121-duplicate-check-lobby-code' into 'main'
Refactor/121 duplicate check lobby code

See merge request cs108-fs26/Gruppe-13!146
2026-04-24 11:26:08 +00:00
Jona Walpert 488e8f524b Merge branch 'fix/123-server-assigned-username-send-to-client' into 'main'
Fix: Readd propagation of server assigned username. Login suername changed to...

Closes #123

See merge request cs108-fs26/Gruppe-13!145
2026-04-24 11:14:23 +00:00
Mathis Ginkel 9488ef41c3 Style: Apply Spotless 2026-04-24 11:46:32 +02:00
Julian Kropff 8bb0bfaf09 Fix: whisper chat not working in game UI 2026-04-24 11:16:34 +02:00
Julian Kropff 33998e4a88 Fix: Chat UI initialization improved in Game UI 2026-04-23 19:59:55 +02:00
Julian Kropff d094df16da Fix: correct layout layering in Game UI 2026-04-23 19:55:57 +02:00
Jona Walpert b9e45142c2 Refactor: changed duplicate lobyb existence checks to the new preexecution check 2026-04-23 15:17:30 +02:00
Jona Walpert 16c91c6aae Feat: Add lobby check to repalce duplicate code 2026-04-23 15:16:45 +02:00
Jona Walpert ea5f6a1083 Fix: Readd propagation of server assigned username. Login suername changed to optional instead of required 2026-04-23 14:46:24 +02:00
Mathis Ginkel c5f37392ef Feat: Add load method to restore all chat message of a chat
Refs #107
2026-04-23 12:06:43 +02:00
Mathis Ginkel 66ee8bec46 Feat: Forward ChatController to all instances where its needed
Refs #107
2026-04-23 12:06:43 +02:00
Mathis Ginkel 36348d0d93 Feat: Add chat box into the game screen
Refs #107
2026-04-23 12:06:43 +02:00
Mathis Ginkel 90b2f3bb3a Feat: Add chat box into game ui 2026-04-23 12:06:38 +02:00
Mathis Ginkel 1cddcf6657 Feat: Add field ChatController to LobbyButtonGridManager 2026-04-23 12:02:49 +02:00
Jona Walpert e358c930c5 Merge branch 'chore/122-fix-long-file-imports' into 'main'
Fix: Correct fxml imports and restore branch state

See merge request cs108-fs26/Gruppe-13!144
2026-04-22 16:33:47 +00:00
Jona Walpert 95fc53ec61 Fix: Wire correct controllers to fxml files
Co-authored-by: Copilot <copilot@github.com>
2026-04-22 18:29:54 +02:00
Jona Walpert 989dc95cef Fix: Final code restoration and import cleanup
Co-authored-by: Copilot <copilot@github.com>
2026-04-22 18:19:21 +02:00
Jona Walpert 2c343c72b3 Merge remote-tracking branch 'origin/main' into chore/122-fix-long-file-imports 2026-04-22 18:07:49 +02:00
Jona Walpert ffbfd2dee4 Fix: Correct fxml imports and restore branch state"
Co-authored-by: Copilot <copilot@github.com>
2026-04-22 17:51:35 +02:00
Jona Walpert 97808fe26d Merge branch 'fix/revert-failed-imports' into 'main'
Revert "Merge branch 'chore/122-fix-long-file-imports' into 'main'"

See merge request cs108-fs26/Gruppe-13!142
2026-04-22 15:43:11 +00:00
Jona Walpert 5b37dffa4c Revert "Merge branch 'chore/122-fix-long-file-imports' into 'main'"
This reverts commit 838ada39d5, reversing
changes made to 028c3adb0d.
2026-04-22 17:39:13 +02:00
Jona Walpert 838ada39d5 Merge branch 'chore/122-fix-long-file-imports' into 'main'
Chore: fix long line class paths in fxml files by using imports

Closes #122

See merge request cs108-fs26/Gruppe-13!141
2026-04-22 12:30:48 +00:00
Jona Walpert 4e675677c0 Chore: fix long line class paths on server side by using imports
Refs #122
2026-04-22 14:20:38 +02:00
Jona Walpert a629136fcb Chore: fix long line class paths on client side by using imports
Refs #122
2026-04-22 14:19:53 +02:00
Jona Walpert 30067bd69b Chore: fix long line class paths in fxml files by using imports
Refs #122
2026-04-22 14:18:50 +02:00
Mathis Ginkel 192c8a2cb9 Feat: Change look of chat box 2026-04-21 22:18:06 +02:00
Jona Walpert 028c3adb0d Merge branch 'chore/remove-unused-imports-lobby-ui' into 'main'
Chore: Remove unused import from lobby ui code

See merge request cs108-fs26/Gruppe-13!139
2026-04-21 18:50:38 +00:00
Jona Walpert 19b555fb47 Chore: Remove unused import from lobby ui code 2026-04-21 20:48:03 +02:00
Jona Walpert 8a7fad11a9 Merge branch 'docs/highscore-protocol' into 'main'
docs: add highscore protocol commands (Issue #110)

Closes #110

See merge request cs108-fs26/Gruppe-13!138
2026-04-21 18:43:34 +00:00
Jona Walpert c0a7cadf7e docs: add highscore protocol commands (Issue #110) 2026-04-21 20:40:52 +02:00
Jona Walpert 2fd07bbf60 Merge branch 'feat/highscore-window-ui' into 'main'
Feat: Add highscore popup UI and lobby display

Closes #110

See merge request cs108-fs26/Gruppe-13!137
2026-04-21 18:35:40 +00:00
Jona Walpert 15c998d549 Feat: Delete window header and white background. Add mouse dragging ability to Highscore popup 2026-04-21 20:31:52 +02:00
Jona Walpert 062e66cdf9 Feat: Add highscore popup UI and lobby display
Highscore button in GameUI replaces "Info" Button wich was unused
(Issue #110)
2026-04-21 20:13:13 +02:00
Jona Walpert 7674ae57ad Merge branch 'feat/highscore-client-protocol' into 'main'
Feat: Add highscore client protocol integration (Issue #110)

See merge request cs108-fs26/Gruppe-13!136
2026-04-21 16:04:04 +00:00
Jona Walpert 5e79b45d90 Feat: Add highscore client protocol integration (Issue #110) 2026-04-21 17:58:49 +02:00
Jona Walpert 45411c4087 Merge branch 'feat/highscore-server-storage' into 'main'
Feat: Add GET_HIGHSCORES and CLEAR_HIGHSCORES server commands (Issue #110)

See merge request cs108-fs26/Gruppe-13!135
2026-04-21 15:52:06 +00:00
Jona Walpert cc7f8a8ef3 Feat: Add GET_HIGHSCORES and CLEAR_HIGHSCORES server commands (Issue #110) 2026-04-21 17:42:38 +02:00
Julian Kropff d3a00aebc0 Merge branch 'fix/game-turn-and-action-bugs' into 'main'
Fix: improve round management, betting validation and game engine test coverage

Closes #118

See merge request cs108-fs26/Gruppe-13!134
2026-04-19 18:31:45 +00:00
Julian Kropff ab2adbf311 Fix: resolve checkstyle magic number and apply spotless formatting 2026-04-19 20:20:57 +02:00
Julian Kropff 8099228d4f Test: improve GameEngine tests and add testPreflopEndsAfterOneActionPerActivePlayer and
testPreflopCountsOnlyNonFoldedPlayersForProgress
Refs #118
2026-04-19 20:11:21 +02:00
Julian Kropff ac83d63ea1 Fix: align RoundManager with Round logic fixes
Refs #118
2026-04-19 20:02:43 +02:00
Julian Kropff 3443b5e8f3 Fix: align TaskbarController with Round logic fixes
Refs #118
2026-04-19 20:02:02 +02:00
Julian Kropff ad7086e5a5 Fix: implement folding in GameController
Refs #118
2026-04-19 19:38:37 +02:00
Julian Kropff e39cbb4357 Fix: adjust GameState logic
Refs #118
2026-04-19 19:35:57 +02:00
Julian Kropff 238a156d91 Fix: round transition logic in RoundManager
Refs #118
2026-04-19 19:28:13 +02:00
Julian Kropff 621843167e Fix: Improve handleAction logic in GameEngine
Refs #118
2026-04-19 19:21:44 +02:00
Julian Kropff 215e7e2cae Fix: Improved validation for betting, calling, raising and folding in TaskbarController.
Prevents incorrect user input during gameplay.
Refs #118
2026-04-19 19:19:11 +02:00
Julian Kropff 03daf9c3b8 Fix: updateTaskbar in CasinoGameController
Refs #118
2026-04-19 18:51:25 +02:00
Julian Kropff d23a00e148 Fix: disable context-dependent buttons in taskbar 2026-04-16 21:18:42 +02:00
JK a5f0735a08 Merge branch 'main' into fix/game-turn-and-action-bugs 2026-04-16 13:41:46 +02:00
Jona Walpert 4855e937e6 Merge branch 'chore/clean-up-command-registry-imports' into 'main'
Chore: fix long imports to make code more readable

See merge request cs108-fs26/Gruppe-13!133
2026-04-16 08:34:39 +00:00
Jona Walpert 007e863878 Chore: fix long imports to make code more readable 2026-04-16 10:25:57 +02:00
Jona Walpert 56aa3c0215 Merge branch 'integration/116-change-username' into 'main'
Feat: Integrate username change flow across lobby, server and chat

See merge request cs108-fs26/Gruppe-13!132
2026-04-15 19:14:23 +00:00
Jona Walpert 417af2e8f7 Merge branch 'feat/116-change-username-in-lobby' into integration/116-change-username 2026-04-15 21:09:49 +02:00
Jona Walpert 893bcee9bf Merge branch 'feat/change-username-command-on-server-side' into integration/116-change-username 2026-04-15 21:09:26 +02:00
Jona Walpert 6d1b467116 Fix: Sent chat messages with current username at send time 2026-04-15 21:06:13 +02:00
Jona Walpert 4687566816 Feat: Added client-side USERNAME_CHANGED event handling with whisper migration 2026-04-15 21:06:05 +02:00
Jona Walpert d27a07f3e8 Fix: Canonicalized outgoing chat sender name from authenticated session user 2026-04-15 21:05:40 +02:00
Jona Walpert b86f18a11c Feat: Added in-game player-id rename propagation for active games 2026-04-15 21:05:25 +02:00
Jona Walpert 7ff274269e Feat: Added lobby-level player rename handling and mapping synchronization 2026-04-15 21:04:57 +02:00
Jona Walpert ec916aa98c Fix: Allowed no-op username changes when new name equals current name 2026-04-15 21:04:38 +02:00
Jona Walpert 190b30672a Feat: Added CHANGE_USERNAME server command, registration and documentation 2026-04-15 20:49:29 +02:00
Jona Walpert 11be6e2b9b Feat: Wired lobby controller login flow to support in-session username changes 2026-04-15 20:43:15 +02:00
Jona Walpert a8599cfb4c Feat: Added CHANGE_USERNAME request support in LobbyClient 2026-04-15 20:42:50 +02:00
Jona Walpert 08b9f652be Feat: Added runtime shared-username update helper in client bootstrap 2026-04-15 20:42:28 +02:00
Jona Walpert 3252c7e534 Feat: Enabled username input section in lobby UI 2026-04-15 20:41:31 +02:00
Lars Simon Winzer 7cba7ac1dd Merge branch 'chore/113-finalize-presentation-for-fourth-milestone' into 'main'
Finalize presentation for fourth milestone

Closes #113, #83, #82, #78, #76, #70, and #67

See merge request cs108-fs26/Gruppe-13!130
2026-04-15 16:15:06 +02:00
Lars Simon Winzer c83a360fec Docs: Remove images containing code from slides 2026-04-15 16:11:58 +02:00
Lars Simon Winzer 2631791330 Docs: Finalize presentation with exported pdf 2026-04-15 13:54:49 +02:00
Jona Walpert 181f538038 fix: disable post-game buttons
Disable action buttons when game reaches FINISHED phase in UI
2026-04-15 00:11:23 +02:00
Jona Walpert 497820db05 Merge branch 'fix/lobby-auto-cleanup' into 'main'
Feat: Auto-cleanup lobbies when game finishes

See merge request cs108-fs26/Gruppe-13!129
2026-04-14 21:35:43 +00:00
Jona Walpert 88c9431bf0 Feat: Auto-cleanup lobbies when game finishes
- Add countNonFoldedPlayers() to GameState for fold-only victory detection
- Auto-transition to FINISHED phase when betting ends
- Clean up lobby (remove players, reset gameController) when game finishes
- Lobby now switches from RUNNING to CREATED and disappears immediately

Fixes: lobby not disappearing after game ends
2026-04-14 23:33:01 +02:00
Jona Walpert 5a53a14933 Merge branch 'feat/use-real-lobby-id' into 'main'
Feat: uses real lobby id and not hardcoded id

See merge request cs108-fs26/Gruppe-13!128
2026-04-14 21:31:12 +00:00
Jona Walpert f7f66ec5db Feat: uses real lobby id and not hardcoded id 2026-04-14 23:15:39 +02:00
Jona Walpert d85b3d21ee Merge branch 'feat/117-send-winner-with-get-gamestate-command' into 'main'
Feat: Winner is now sent to the frontend with get_gamestate

Closes #117

See merge request cs108-fs26/Gruppe-13!127
2026-04-14 21:13:57 +00:00
Jona Walpert 382383d38b Feat: Winenr is now sent to the frontend with get_gamestate 2026-04-14 23:09:48 +02:00
Jona Walpert 6f345cc51e Merge branch 'feat/ms-4-integration' into 'main'
Feat/ms 4 integration

Closes #59, #45, #52, #72, #73, #68, #71, and #36

See merge request cs108-fs26/Gruppe-13!126
2026-04-13 01:07:52 +00:00
Jona Walpert 585d675a8f fix: javadoc for MR 2026-04-13 03:04:54 +02:00
Jona Walpert b25f111f48 Merge branch 'feat/ms-4-integration' of https://git.scicore.unibas.ch/cs108-fs26/Gruppe-13 into feat/ms-4-integration 2026-04-13 02:58:20 +02:00
Jona Walpert d82297ac46 Fix: lobyb chat race condition 2026-04-13 02:57:07 +02:00
Julian Kropff 8c2130d0d6 Fix: checkstyle 2026-04-13 02:40:20 +02:00
Jona Walpert 52b5d5b8c2 fix: checkstyle methode length 2026-04-13 02:24:29 +02:00
Julian Kropff 1f8cf35e55 Docs: add JavaDocs 2026-04-13 02:16:26 +02:00
Julian Kropff 0bf24b9e0f Fix: Chat implementation completed 2026-04-13 01:44:18 +02:00
Jona Walpert a85eb968fa Add: round edges for Table image 2026-04-13 01:25:05 +02:00
Jona Walpert 0006ed9faa Add: change wording 2026-04-13 01:24:26 +02:00
Jona Walpert 457fa58a07 Add: remove footer 2026-04-13 01:18:29 +02:00
Jona Walpert 22b3e1764d Feat: Add downlaod button functionality to download project from gitlab 2026-04-13 01:16:49 +02:00
Julian Kropff 44785ee77f Fix: Issues with the chat UI display have been resolved 2026-04-13 01:15:21 +02:00
Jona Walpert 31f7ee8935 Add: change placehodler link in developer Card of "Jona Walpert" to his homepage 2026-04-13 01:13:13 +02:00
Jona Walpert 088407b041 Feat: Add clickable Developer Cards with placehodler links 2026-04-13 01:12:16 +02:00
Jona Walpert 30f98b1333 Add: Shortened website title 2026-04-13 01:07:23 +02:00
Jona Walpert 10dac9a68e Add: remove unnecessary placholder Video 2026-04-13 01:05:30 +02:00
Jona Walpert 786b7e990d Feat: Add English - German Switch, Add Trailer & Gameplay section 2026-04-13 01:02:35 +02:00
Julian Kropff 3053d531ee Fix: A bug with the Raise Button in the Game UI 2026-04-13 00:45:57 +02:00
Julian Kropff acb082ce5d Fic: Chat Implementation in the Lobby UI and Game UI 2026-04-13 00:35:08 +02:00
Julian Kropff 6aedb57473 Fix: Casono Rules Easy Description has been revised 2026-04-13 00:14:55 +02:00
Jona Walpert 66f0d734cf fix: fix broken UnitTest after game integration 2026-04-12 23:45:40 +02:00
Julian Kropff 6ec743f126 Fix: revision of chatContainer in the Casinomainui and Casinogameui styles 2026-04-12 22:56:40 +02:00
Julian Kropff 696f9f4fa4 Merge branch 'main' into feat/ms-4-integration 2026-04-12 22:16:58 +02:00
Julian Kropff 4557dc2f5a Fix: comment out unused input box and button 2026-04-12 21:52:40 +02:00
Julian Kropff b208f1fffd Fix: Dealer button display issue 2026-04-12 21:47:13 +02:00
Julian Kropff 6216268658 Fix: Resolve blocking issues to enable full game loop 2026-04-12 21:39:24 +02:00
Lars Simon Winzer 133a79433d Merge branch 'feat/documents-ms4' into 'main'
Add: first part of the powerpoint presentation for MS4

Closes #62, #75, and #69

See merge request cs108-fs26/Gruppe-13!125
2026-04-12 20:57:24 +02:00
Lars Simon Winzer 8fe96c5413 Merge branch 'chore/95-write-document-for-software-quality' into 'main'
Write QA concept document covering software quality

Closes #79, #80, and #95

See merge request cs108-fs26/Gruppe-13!124
2026-04-12 20:44:17 +02:00
Lars Simon Winzer 885a002f6d Docs: Updated qa concept document based on external input 2026-04-12 20:41:12 +02:00
Julian Kropff fb593d48a6 Fix: loop Animation in Game-UI 2026-04-12 20:11:10 +02:00
Lars Simon Winzer 9746f52965 Docs: Finalize QA concept document with data from JaCoCo
Note: The data covered the state of the repository at 1952f720de
2026-04-12 19:44:46 +02:00
Julian Kropff 06c059ce5e Fix: fast Game UI communication fix: display the opponent 2026-04-12 19:31:30 +02:00
Lars Simon Winzer 1952f720de Merge branch 'main' into 'chore/95-write-document-for-software-quality' 2026-04-12 19:27:42 +02:00
Mathis Ginkel d7eb9701c9 Merge branch 'feat/84-whisper-chat' into 'main'
Add whisper chat option

Closes #84

See merge request cs108-fs26/Gruppe-13!123
2026-04-12 16:47:09 +00:00
Jona Walpert 0f8f1bb918 fix: checkstyle and spotless 2026-04-12 18:36:47 +02:00
Jona Walpert 9cf6b468ad fix: correctly disaply lobbei and update them in Lobyb Screen 2026-04-12 16:02:50 +02:00
Mathis Ginkel e08b75dc7a Style: Apply Spotless 2026-04-12 15:31:59 +02:00
Lars Simon Winzer 761d4b1cae Docs: Add QA concept document for software quality assurance (lacking values) 2026-04-12 15:21:00 +02:00
Jona Walpert e4f0c7efb8 fix: Treat SocketException as client disconnect in SessionReader 2026-04-12 15:16:35 +02:00
Jona Walpert f91642bade Fix: fetch lobbies on client startup 2026-04-12 15:13:33 +02:00
Jona Walpert 93b6338041 Merge branch 'feat/lobby-expiry-broadcast' into 'main'
Feat: Expiry broadcast + client event handling and robustness

See merge request cs108-fs26/Gruppe-13!122
2026-04-12 12:57:42 +00:00
Jona Walpert a66c91c67f Merge branch 'main' into feat/lobby-expiry-broadcast 2026-04-12 14:54:09 +02:00
Jona Walpert 3e1d787b69 Feat: Add findEmptyLobbiesOlderThan to find and remove stale empty lobbies 2026-04-12 14:52:30 +02:00
Jona Walpert bc36892699 Feat: Expiry broadcast + client event handling and robustness 2026-04-12 14:40:17 +02:00
Julian Kropff 120a477a55 Merge branch 'feat/game-ui-communication' into 'main'
Fix: Game UI to support server commands

See merge request cs108-fs26/Gruppe-13!121
2026-04-12 12:07:37 +00:00
Jona Walpert 5d4fe4bcfb Merge branch 'feat/lobby-status' into 'main'
Feat: Add STATUS param to GET_LOBBY_STATUS and client parsing

See merge request cs108-fs26/Gruppe-13!120
2026-04-12 11:55:57 +00:00
Jona Walpert 346a728fb9 Feat): Add STATUS param to GET_LOBBY_STATUS and client parsing 2026-04-12 13:53:23 +02:00
Jona Walpert 63fb6e4b47 Merge branch 'feat/lobby-join-logging' into 'main'
Feat/lobby join logging

See merge request cs108-fs26/Gruppe-13!119
2026-04-12 11:33:41 +00:00
Jona Walpert 9044ce3660 Fix: Allow primitive values to contain hyphens (UUIDs) in addition to digits/words/colons 2026-04-12 13:31:00 +02:00
Jona Walpert 4fa60ad9e0 Fix: Apply checkstyle fixes 2026-04-12 13:30:11 +02:00
Jona Walpert 3abc03e6e1 Fix: fix error when switching back to mainLobby when exiting gameUI 2026-04-12 13:25:59 +02:00
Jona Walpert e43732c520 Feat: Log JOIN_LOBBY requests and joins 2026-04-12 13:12:55 +02:00
Jona Walpert 1dcf628d2c Feat: Log player joins in LobbyManager 2026-04-12 13:08:57 +02:00
Julian Kropff 4e65e2dec0 Merge branch 'feat/lobby-button-styling' into 'main'
Style: update Lobby Button styles in Casino Main UI

See merge request cs108-fs26/Gruppe-13!118
2026-04-12 10:59:53 +00:00
Jona Walpert 492901a837 Merge branch 'feat/100-add-start-game-command-on-server-side' into 'main'
Feat/100 add start game command on server side

Closes #100

See merge request cs108-fs26/Gruppe-13!109
2026-04-12 10:53:44 +00:00
Julian Kropff 659ea8a744 Fix: update Lobby Button styles in Casino Main UI 2026-04-12 12:53:44 +02:00
Jona Walpert 5e653a516c Merge branch 'main' into feat/100-add-start-game-command-on-server-side 2026-04-12 12:45:24 +02:00
Jona Walpert f5ee57454d Merge branch 'feat/93-add-serverside-create-lobby-command' into 'main'
Feat: Add createLobby command on server side

Closes #93

See merge request cs108-fs26/Gruppe-13!117
2026-04-12 10:10:41 +00:00
Jona Walpert fa8bb25b03 Add: Register create_lobby command 2026-04-12 12:03:41 +02:00
Jona Walpert e6c222388b Fix: add correct parsing on client side for create_lobyb command 2026-04-12 12:03:07 +02:00
Julian Kropff 7316ec80bf Fix: cleanup CasinoGameController and fix lifecycle issues
Refs #52
2026-04-12 11:42:20 +02:00
Jona Walpert b86352a298 Merge branch 'main' into feat/93-add-serverside-create-lobby-command 2026-04-12 11:27:11 +02:00
Jona Walpert a7de101be2 Merge branch 'feat/session-dispatcher' into 'main'
Feat: Add SessionDispatcher to send responses by username

See merge request cs108-fs26/Gruppe-13!116
2026-04-12 09:23:07 +00:00
Jona Walpert a2cd59e6b9 Feat: Add SessionDispatcher to send responses by username 2026-04-12 11:20:18 +02:00
Jona Walpert 564ace38e4 Merge branch 'feat/change-username-at-start-or-in-game' into 'main'
Feat: accept optional client username and forward to ClientApp

See merge request cs108-fs26/Gruppe-13!115
2026-04-12 09:17:38 +00:00
Jona Walpert d16c348444 Fix: fix javadoc for MR 2026-04-12 11:14:30 +02:00
Julian Kropff 8f3d0ab8a9 Fix: update GameService to support server commands
Refs #52
2026-04-12 10:58:54 +02:00
Jona Walpert 77ec50e008 Merge branch 'main' into feat/change-username-at-start-or-in-game 2026-04-12 10:58:19 +02:00
Julian Kropff 869f061d86 Fix: update GameClient to support server commands
Refs #52
2026-04-12 10:58:16 +02:00
Jona Walpert 9635ee8ef9 Fix: robust response parsing and clearer errors in ClientService Detect +OK / -ERR / -ERROR, strip leading tabs, collect response lines reliably and improve exception unwrapping. 2026-04-12 10:56:22 +02:00
Jona Walpert 65a93a8c82 Feat: Reuse shared ClientService in CasinomainuiController
Make the controller use ClientApp.getSharedClientService() if available; otherwise fall back to creating a new ClientService. Add/cleanup Javadoc.
2026-04-12 10:52:55 +02:00
Jona Walpert c3e0e740ed Feat: Keep startup LOGIN connection and expose shared ClientService
Introduce ClientApp.sharedClientService, create it on startup when a username is provided, run the startup LOGIN asynchronously on that connection and keep the socket open so the UI reuses it; add Javadoc and adjust logging.
2026-04-12 10:52:22 +02:00
Jona Walpert 0ae88c9149 Fix: Parse LOGIN response id as string in LobbyClient
Parse the server ID parameter as a string and return it in LoginResult (no integer parsing).
2026-04-12 10:45:03 +02:00
Jona Walpert 0aafe13e34 Fix: Treat login id as string (UUID) in LoginResult
Change LoginResult.id from int to String and add Javadoc explaining the server returns a UUID.
BREAKING CHANGE: LoginResult.getId() now returns String (UUID).
2026-04-12 10:43:43 +02:00
Jona Walpert 4798de7499 Feat: Log assigned username and id on registration
Add INFO log in UserFactory.create to record assigned username, user UUID and session id when a new user is registered.
2026-04-12 10:42:56 +02:00
Lars Simon Winzer 3359c9bc7e Docs: Add missing diary entries to diary README 2026-04-12 10:37:00 +02:00
Jona Walpert 346a308176 Merge branch 'feat/change-username-at-start-or-in-game' of https://git.scicore.unibas.ch/cs108-fs26/Gruppe-13 into feat/change-username-at-start-or-in-game 2026-04-12 09:36:48 +02:00
Julian Kropff 8998152e8d Fix: checkstyle 2026-04-12 09:31:25 +02:00
Julian Kropff ef7a83c707 Merge branch 'feat/lobby-ui-input-field-style' into 'main'
Style: Lobby UI input field

See merge request cs108-fs26/Gruppe-13!114
2026-04-12 07:18:43 +00:00
Jona Walpert d9e7c0c56d Merge branch 'main' into feat/change-username-at-start-or-in-game 2026-04-12 09:12:46 +02:00
Julian Kropff 0227145cab Fix: translations in Casino Main UI 2026-04-12 09:11:34 +02:00
Julian Kropff 755ea54381 Style: add gray-input-field class to Casino Main UI
Refs #106
2026-04-12 09:05:10 +02:00
jk c0b149cc5f Fix: add lobby ui input field style and fix translations
Refs #106
2026-04-12 09:00:41 +02:00
Jona Walpert 1669e07d3a Merge branch 'feat/105-add-fold-command-on-server-side' into 'main'
Feat/105 add fold command on server side

Closes #105

See merge request cs108-fs26/Gruppe-13!113
2026-04-11 23:21:05 +00:00
Jona Walpert d0e908774b Docs: Add documentation for fold command 2026-04-12 01:18:24 +02:00
Jona Walpert 08e02a6135 Feat: add Fold command on server side 2026-04-12 01:17:14 +02:00
Jona Walpert 6ee9c6c399 Merge branch 'feat/104-add-call-command-on-server-side' into 'main'
Feat/104 add call command on server side

Closes #104

See merge request cs108-fs26/Gruppe-13!112
2026-04-11 23:12:51 +00:00
Jona Walpert fb5399fc18 Docs: add documentation for call command 2026-04-12 01:06:41 +02:00
Jona Walpert 6d8f1787a9 Feat: add Call command to server side 2026-04-12 01:06:17 +02:00
Jona Walpert 9b4c6d8906 Merge branch 'feat/103-add-raise-command-on-server-side' into 'main'
Feat/103 add raise command on server side

Closes #103

See merge request cs108-fs26/Gruppe-13!111
2026-04-11 22:57:11 +00:00
Jona Walpert ca818d9892 Fix: Checkstyle Line length for MR Pipeline 2026-04-12 00:54:10 +02:00
Jona Walpert dac4dcfdbe Docs: Add documentation for Raise command 2026-04-12 00:47:41 +02:00
Jona Walpert 0556767d40 Feat: Add Raise command on backend side 2026-04-12 00:47:24 +02:00
Jona Walpert 5997e736cf Merge branch 'feat/102-add-bet-command-on-server-side' into 'main'
Feat/102 add bet command on server side

Closes #102

See merge request cs108-fs26/Gruppe-13!110
2026-04-11 22:37:32 +00:00
Jona Walpert a4e267cb00 Fix: add missing file for MR pipeline 2026-04-12 00:34:32 +02:00
Jona Walpert 9146d92c04 Fix: fix MR Pipeline 2026-04-12 00:27:45 +02:00
Mathis Ginkel b2adeb7a56 Feat: Add whisper chat functionality
Introduce recording of users connected to server, to show usernames as options for whisper chat.
2026-04-12 00:19:34 +02:00
Jona Walpert d77ce42795 Docs: add documentation of bet command 2026-04-12 00:11:30 +02:00
Jona Walpert f5a62c6e93 Feat: add bet command on server side 2026-04-12 00:11:11 +02:00
Jona Walpert 371e6afe5c Docs: add documentation of new start_game command 2026-04-11 23:18:22 +02:00
Jona Walpert 23debb18bc Feat: Add start_Game command to server 2026-04-11 23:17:39 +02:00
Lars Simon Winzer 3ff4491fcf Merge branch 'chore/101-remove-unused-blog-folder' into 'main'
Remove blog in documents

Closes #101

See merge request cs108-fs26/Gruppe-13!108
2026-04-11 23:09:07 +02:00
Lars Simon Winzer 31361ffb83 Docs: Remove blog folder from main readme in repository structure 2026-04-11 23:06:34 +02:00
Lars Simon Winzer 0f93bb8b85 Docs: Removed README of blog 2026-04-11 23:03:21 +02:00
Julian Kropff 4dd6732945 Docs: add Casono Manual pdf -> MS-4
Refs #75
2026-04-11 22:37:33 +02:00
Julian Kropff 3354bf7be1 Docs: add Casono Rules Easy Description pdf -> MS-4
Refs #75
2026-04-11 22:34:41 +02:00
Jona Walpert 3b8f7d42dd Merge branch 'feat/99-add-get-gamestate-command-on-server-side' into 'main'
Feat/99 add get gamestate command on server side

Closes #99

See merge request cs108-fs26/Gruppe-13!107
2026-04-11 20:08:19 +00:00
Julian Kropff a38b2562d1 Docs: add Casono Manual
Refs #75
2026-04-11 22:05:33 +02:00
Jona Walpert 54a7be074f Feat: Add get_game_state_command on server side 2026-04-11 22:04:47 +02:00
Jona Walpert 1b6e8ce6d6 Docs: add documentation for get_gamestate command 2026-04-11 22:02:09 +02:00
Julian Kropff 6e4e8f5150 Docs: revise Casono Rules Easy Description 2026-04-11 21:44:58 +02:00
Jona Walpert c7b7adaa07 Merge branch 'docs/fix-broken-javadoc-for-get-lobby-status-command' into 'main'
Docs: add get-lobby-status javadoc

Closes #96

See merge request cs108-fs26/Gruppe-13!106
2026-04-11 19:40:09 +00:00
Julian Kropff 84b889a343 Add: new images for Casono Rules Easy Description 2026-04-11 21:40:04 +02:00
Jona Walpert 25c92da522 Docs: add get-lobby-status javadoc 2026-04-11 21:36:44 +02:00
Jona Walpert 7f6a3ada29 Merge branch 'feat/94-add-get-lobby-list-command-on-server-side' into 'main'
Feat/94 add get lobby list command on server side

Closes #94

See merge request cs108-fs26/Gruppe-13!105
2026-04-11 19:29:06 +00:00
Jona Walpert 098092707c Merge branch 'main' into feat/94-add-get-lobby-list-command-on-server-side 2026-04-11 21:20:04 +02:00
Jona Walpert f467d9ebe2 Docs: Add new get_lobby_list command 2026-04-11 21:12:30 +02:00
Jona Walpert 13d03637da Add: register get_lobby_list command 2026-04-11 21:12:03 +02:00
Jona Walpert 50052b72ff Feat: Add get_lobby_listcommand to server 2026-04-11 21:11:40 +02:00
Jona Walpert ab4ba0f70b Merge branch 'feat/96-add-getlobbystatus-command-on-server-side' into 'main'
Feat/96 add getlobbystatus command on server side

See merge request cs108-fs26/Gruppe-13!104
2026-04-11 19:09:04 +00:00
Jona Walpert 46ccae40ad Style: apply spotless 2026-04-11 20:51:49 +02:00
Jona Walpert 050beb9d98 Docs: update command documentation 2026-04-11 20:50:19 +02:00
Jona Walpert 517df2369d Add: register get_lobby_statsu command 2026-04-11 20:49:23 +02:00
Jona Walpert 6219c2d660 Feat: Add get_Lobby_Status command on server side 2026-04-11 20:48:58 +02:00
Jona Walpert 57b8bca1a8 Merge branch 'feat/96-add-getlobbystatus-command-on-server-side' into 'main'
Feat/96 add getlobbystatus command on server side

Closes #96

See merge request cs108-fs26/Gruppe-13!103
2026-04-11 18:35:56 +00:00
Jona Walpert 050d87ce57 Docs: Add command documentation for get_lobby_status 2026-04-11 20:32:38 +02:00
Jona Walpert a930bd94b5 Feat: Add getlobbbystatus command 2026-04-11 20:31:25 +02:00
Jona Walpert 66ee791342 Merge branch 'feat/97-add-joinlobby-command-on-server-side' into 'main'
Feat: Add addPlayer command on sever side

Closes #97

See merge request cs108-fs26/Gruppe-13!102
2026-04-11 17:49:56 +00:00
Jona Walpert 240bba9bf5 Style: apply Spotless for Serverapp 2026-04-11 19:46:48 +02:00
Jona Walpert 15d1ea4edd Add: Register JoinLobby command 2026-04-11 19:45:55 +02:00
Jona Walpert 3badca0a01 Merge branch 'feat/97-add-joinlobby-command-on-server-side' of https://git.scicore.unibas.ch/cs108-fs26/Gruppe-13 into feat/97-add-joinlobby-command-on-server-side 2026-04-11 19:42:09 +02:00
Jona Walpert 203004fc42 Add: register JoinLobby command 2026-04-11 19:31:33 +02:00
Jona Walpert de0d0f93f8 Docs: Applied Spotless to JoinLobby command 2026-04-11 19:30:54 +02:00
Jona Walpert 7788bbc5d3 Style: Spotless apllied to JoinLobby command 2026-04-11 19:28:17 +02:00
Jona Walpert 2c6ecdc0f9 Docs: Add javadoc for JoinLobby command 2026-04-11 19:20:04 +02:00
Lars Simon Winzer 15ab6faf2e Merge branch 'feat/98-checkstyle-methodlength-in-serverapp' into 'main'
Allow longer method length in ServerApp

Closes #98

See merge request cs108-fs26/Gruppe-13!101
2026-04-11 18:49:31 +02:00
Lars Simon Winzer 25c20a2ea3 Fix: Allow longer method length in ServerApp 2026-04-11 18:46:50 +02:00
Jona Walpert 73dd00f37d Feat: Add JoinLobby Command to server side
This command adds the possibility to join a created lobby
2026-04-11 18:29:21 +02:00
Jona Walpert f512e6c422 Merge branch 'feat/73-support-for-multiple-lobbies' into feat/97-add-joinlobby-command-on-server-side 2026-04-11 18:15:32 +02:00
Jona Walpert eb3ffee6fc Merge branch 'feat/92-add-serverside-add-player-command' into 'feat/97-add-joinlobby-command-on-server-side'
Feat: Add addPlayer command on sever side

See merge request cs108-fs26/Gruppe-13!100
2026-04-11 16:08:48 +00:00
Jona Walpert af9daecf46 Docs: Add documentation for Join_lobby command 2026-04-11 18:03:18 +02:00
Jona Walpert 2ab27ac3ed Feat: Add lobby class and Manager with conenction to Game engine. The gameengine will be satrte when 4 players joined the lobby. This is made possible by the callback-driven-Listener
Refs #73
2026-04-11 17:41:45 +02:00
Julian Kropff 48e6b51ad1 Merge branch 'feat/game-ui' into 'main'
Add Game UI logic

See merge request cs108-fs26/Gruppe-13!99
2026-04-11 14:59:56 +00:00
Jona Walpert e655530760 Feat: Add addPlayer command on sever side
Rafs #92
2026-04-11 16:48:58 +02:00
Jona Walpert 62f01d1e5d Docs: add documentation of create_lobby commad 2026-04-11 16:44:19 +02:00
Jona Walpert ca4283bbe7 Feat: Add createLobby command on server side
Refs #93
2026-04-11 16:38:57 +02:00
Julian Kropff 3c7773e7fb Fix: checkstyle violations 2026-04-11 16:34:24 +02:00
Julian Kropff 406567d375 Fix: Integration of chatbox.fxml into Casinogameui 2026-04-11 16:29:07 +02:00
Lars Simon Winzer ff0f9f70d4 Merge branch 'chore/91-add-jacoco-as-gradle-dependency' into 'main'
Build: Add JaCoCo as gradle plugin

Closes #91

See merge request cs108-fs26/Gruppe-13!98
2026-04-11 15:56:28 +02:00
Lars Simon Winzer 53cafd3dd2 Build: Add JaCoCo as gradle plugin 2026-04-11 15:53:23 +02:00
Julian Kropff 30dcd8f4ab Merge branch 'main' into feat/game-ui
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/GameClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java
#	src/main/resources/ui-structure/Casinogameui.fxml
2026-04-11 15:16:46 +02:00
Julian Kropff f54182fde6 Merge branch 'chore/ui-checkstyle-fixes' into 'main'
Fix: Resolving Git Merge Conflicts

Closes #88

See merge request cs108-fs26/Gruppe-13!97
2026-04-11 13:10:57 +00:00
Mathis Ginkel 9e7a80c17d Docs: add description of enum ChatType
Refs #88
2026-04-11 15:07:55 +02:00
Mathis Ginkel 9df3042978 Style: fix line breaks in UsernameAvailability
Refs #88
2026-04-11 14:57:23 +02:00
Mathis Ginkel 69333ede7a Fix: change visibility of enum UsernameAvailability
Refs #88
2026-04-11 14:48:46 +02:00
Julian Kropff cdb6d0c6b0 Fix: revert wrongfully deleted line breaks
Refs #88
2026-04-11 14:43:48 +02:00
Mathis Ginkel a65341b648 Style: Manually revert changes made to SuccessResponse 2026-04-11 14:37:13 +02:00
Julian Kropff b4b2e3b067 Fix: Resolving Git Merge Conflicts and Checkstyle
Refs #88
2026-04-11 14:01:21 +02:00
Julian Kropff beeba04a2c Merge branch 'feat/client-chat' into chore/ui-checkstyle-fixes
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/ChatController.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/ChatModel.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/Message.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ChatClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ClientService.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/CoreClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/GameClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/LobbyClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/chatui/ChatViewController.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/lobbyui/LobbyButtonGridManager.java
#	src/main/resources/ui-structure/components/Chatbox.fxml
2026-04-11 12:56:01 +02:00
Julian Kropff edb98c8d21 Merge branch 'feat/client-communication' into chore/ui-checkstyle-fixes
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java
2026-04-11 12:20:27 +02:00
Mathis Ginkel 590a9aa658 Style: Manually revert changes made to UsernameAvailability enum 2026-04-11 11:56:06 +02:00
Lars Simon Winzer 7d74ed6263 Merge branch 'chore/87-write-documentation-to-explain-our-protocol' into 'main'
Documentation describing the structure and conventions of our network protocol

Closes #77 and #87

See merge request cs108-fs26/Gruppe-13!96
2026-04-11 11:32:49 +02:00
Lars Simon Winzer 2d7b15e593 Docs: Documentation describing the structure and conventions of our network protocol 2026-04-11 11:21:00 +02:00
Mathis Ginkel 66d3826509 Docs: Delete outdated network protocol document 2026-04-11 11:16:21 +02:00
Julian Kropff 2e705185f4 Fix: checkstyle 2026-04-11 08:33:02 +02:00
Mathis Ginkel 9c09927d09 Docs: Adding Server Commands for Client Chat to the protocol document manually reverting changes 2026-04-10 23:25:05 +02:00
Mathis Ginkel 97e5a55042 Style: Apply Spotless 2026-04-10 22:43:23 +02:00
Julian Kropff f6dda36c8d Merge branch 'main' into feat/game-ui 2026-04-10 21:05:53 +02:00
Julian Kropff 4de90e6962 Add: PlayerStatusController class -> player status (name, chips, dealer, fold state)
Refs #52
2026-04-10 20:59:07 +02:00
Julian Kropff 284ff2d043 Refactor: improve TaskbarController class -> Action system (fold/call/raise) implemented
Refs #52
2026-04-10 20:52:21 +02:00
Julian Kropff c02680143f Refactor: improve CasinoGameController class -> create UI layout for poker table
Refs #52
2026-04-10 20:46:50 +02:00
Julian Kropff cb7c284314 Fix: small style fixes 2026-04-10 20:41:12 +02:00
Julian Kropff a2d176f13c Refactor: improve CasinoGameUI structure
Refs #52
2026-04-10 20:34:49 +02:00
Julian Kropff 644c3e93fc Refactor: improve Card class
Refs #52
2026-04-10 20:31:15 +02:00
Julian Kropff d0ab49ec57 Add: GameService class
Refs #52
2026-04-10 20:29:26 +02:00
Julian Kropff 8deb647e94 Refactor: improve GameState class
Refs #52
2026-04-10 20:25:54 +02:00
Julian Kropff 3ea2971ab5 Refactor: improve Player class
Refs #52
2026-04-10 20:23:42 +02:00
Julian Kropff d10e9a72fd Add: PlayerId class
Refs #52
2026-04-10 20:20:45 +02:00
Julian Kropff ea41a3c75a Add: PlayerState class
Refs #52
2026-04-10 20:18:20 +02:00
Julian Kropff ce583062ba Refactor: improve GameClient structure
Refs #52
2026-04-10 20:16:08 +02:00
Julian Kropff 040ff7cf52 Fix: correct CasinoGame UI
Refs #52
2026-04-10 20:12:14 +02:00
Julian Kropff 616f609fae Fix: update Casinogame UI styles
Refs #52
2026-04-10 20:09:04 +02:00
Julian Kropff 4895af9030 Fix: correct Taskbar UI
Refs #52
2026-04-10 20:05:49 +02:00
Julian Kropff db3f34fddf Fix: correct Player status UI layout
Refs #52
2026-04-10 20:02:33 +02:00
Jona Walpert 999dd9beb9 Style: Apply Spotless 2026-04-10 14:59:27 +02:00
Jona Walpert 3be2d3d9f4 Fix: Chekstyle naming convention 2026-04-10 14:58:00 +02:00
Jona Walpert c094b224c3 Feat: Auto-assign playerN and add server-side rename support
Make username mutable, assign playerN for anonymous logins, and add atomic changeUsername in UserRegistry.

Refs #68
2026-04-10 14:20:21 +02:00
Jona Walpert 3807059229 Feat: accept optional client username and forward to ClientApp
Pass host/port and optional username via system properties for the UI.

Refs #68
2026-04-10 14:12:24 +02:00
Mathis Ginkel 31d3947175 Add: CSS-Style changes to the ChatBox 2026-04-10 13:21:34 +02:00
Lars Simon Winzer 3ee1e63577 Merge branch 'fix/81-incorrect-visibility-of-throwingparser' into 'main'
Change visibility of ThrowingParser from package-private to public

Closes #81

See merge request cs108-fs26/Gruppe-13!94
2026-04-10 11:30:22 +02:00
Lars Simon Winzer 8f4ce1db80 Fix: Change visibility of ThrowingParser from package-private to public 2026-04-10 11:25:09 +02:00
Lars Simon Winzer 066d4ee8c3 Merge branch 'chore/66-milestone-achievements-template-and-contributing' into 'main'
Add milestone achievements template and update contributing guidelines

Closes #66

See merge request cs108-fs26/Gruppe-13!93
2026-04-10 10:57:40 +02:00
Lars Simon Winzer 5ed455c20d Refactor: Cut header length 2026-04-10 10:48:52 +02:00
Lars Simon Winzer 938ef71c2a Revert "Refactor: Swap title and category header and cut header length"
This reverts commit 09e8822bef.
2026-04-10 10:35:25 +02:00
Lars Simon Winzer 09e8822bef Refactor: Swap title and category header and cut header length 2026-04-10 10:34:37 +02:00
Lars Simon Winzer 35297775dc Add: Milestone Achievements section to contribution guidelines 2026-04-10 10:28:10 +02:00
Lars Simon Winzer 77dad54c84 Add: Milestone achievement gitlab issue template 2026-04-10 10:14:03 +02:00
Jona Walpert 59cd5bca88 Docs: Add teammeating document with new division of tasks for milestone 4 2026-04-10 10:07:29 +02:00
Mathis Ginkel 1914aa2c7f Merge branch 'main' into 'feat/client-chat'
# Conflicts:
#   src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/ServerApp.java
2026-04-09 19:34:38 +00:00
Mathis Ginkel 13df8db33e Docs: Insert JavaDocs 2026-04-09 21:25:46 +02:00
Mathis Ginkel 566c9375ab Style: Apply Spotless 2026-04-09 20:36:18 +02:00
jk a43361d606 Fix: Brightened the images 2026-04-09 19:21:07 +02:00
Lars Simon Winzer 983d31c963 Merge branch 'fix/64-execute-method-of-commandhandler-is-not-abstract' into 'main'
Change execute method in CommandHandler to be abstract

Closes #64

See merge request cs108-fs26/Gruppe-13!91
2026-04-09 19:17:28 +02:00
Lars Simon Winzer 4071be3341 Fix: Change execute method in CommandHandler to be abstract 2026-04-09 19:14:15 +02:00
Lars Simon Winzer 74497a1e8e Merge branch 'feat/63-add-serverside-list-users-command' into 'main'
Add serverside LIST_USERS command

Closes #63

See merge request cs108-fs26/Gruppe-13!90
2026-04-09 19:13:17 +02:00
Lars Simon Winzer afef96ce21 Docs: Write JavaDoc for newly added components 2026-04-09 19:07:08 +02:00
Lars Simon Winzer bb1e026a1e Docs: Update protocol document for LIST_USERS command 2026-04-09 18:59:18 +02:00
Lars Simon Winzer a96c050c55 Fix: ListUsersResponse to properly encapsulate user parameters in a block 2026-04-09 18:53:26 +02:00
Lars Simon Winzer a164f87379 Fix: Correctly retrieve user ID value in ListUsersResponse 2026-04-09 18:48:24 +02:00
Lars Simon Winzer f59f5c5930 Add: Registration of parser and handler to composition root 2026-04-09 18:46:45 +02:00
Lars Simon Winzer 627c38da6f Add: ListUsersHandler to handle user listing command 2026-04-09 18:46:20 +02:00
Lars Simon Winzer 239dfa714e Add: ListUsersResponse to convert collection of users to response body 2026-04-09 18:30:14 +02:00
Lars Simon Winzer 40d623fbb7 Add: ListUsersParser to parse request 2026-04-09 18:19:10 +02:00
Lars Simon Winzer 1d500e6973 Add: ListUsersRequest to request collection of active users 2026-04-09 18:18:01 +02:00
Mathis Ginkel 84e68d8b20 Merge remote-tracking branch 'origin/feat/client-chat' into feat/client-chat
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/ChatController.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/ChatModel.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/Message.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ChatClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/ClientService.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/GameClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/network/LobbyClient.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/chatui/ChatBoxController.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/chatui/ChatViewController.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/get_next_message/GetNextMessageHandler.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/get_next_message/GetNextMessageResponse.java
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/send_message/SendMessageParser.java
#	src/main/resources/ui-structure/Casinogameui.fxml
#	src/main/resources/ui-structure/components/chatui/chatbox.fxml
#	src/main/resources/ui-structure/components/chatui/chattab.fxml
#	src/main/resources/ui-structure/gameuicomponents/chatui/chatbox.fxml
#	src/test/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/ChatApplication.java
#	src/test/java/ch/unibas/dmi/dbis/cs108/casono/client/chat/ChatTest.java
2026-04-09 18:13:29 +02:00
Mathis Ginkel e8401a976a Add: First implementation of Button, to create Whisper Chat 2026-04-09 18:04:57 +02:00
Mathis Ginkel c0c9225d42 Fix: Parsing of Server Responses for Client Chat 2026-04-09 18:04:57 +02:00
Mathis Ginkel 4e7b0ab67a Add: Implement Commands for Chat Protocol 2026-04-09 18:04:57 +02:00
Mathis Ginkel 39f60c9113 Fix: small changes to ChatUI 2026-04-09 18:04:57 +02:00
Jona Walpert 847d816935 Add: first (non functioning) modified version of lobby button controlelr with abckend conenction 2026-04-09 18:04:57 +02:00
Julian Kropff c8a9393fb6 Add: documentation for client network architecture 2026-04-09 18:04:57 +02:00
Julian Kropff 79bd33ad75 Add: initial client structure for game and network 2026-04-09 18:04:57 +02:00
Mathis Ginkel f5138503cb Add: CoreClient and ChatClient 2026-04-09 18:04:57 +02:00
Julian Kropff 93e39c3962 Add: Client Network Architecture Documentation 2026-04-09 18:04:57 +02:00
Mathis Ginkel 7d19e65428 Add: client chat architecture for lobby and global chat 2026-04-09 18:04:50 +02:00
Mathis Ginkel 87e9305e82 Fix: small changes in ClientService 2026-04-09 18:03:26 +02:00
Mathis Ginkel de66757837 Resolve Conflicts 2026-04-09 18:03:26 +02:00
Mathis Ginkel 65304cbb66 Merge remote-tracking branch 'origin/main' 2026-04-09 18:02:35 +02:00
Jona Walpert 1b154c685e Add: change table preview to more detailled image 2026-04-09 16:56:16 +02:00
Jona Walpert f12e1e4529 Fix: typo in website 2026-04-09 16:55:39 +02:00
Lars Simon Winzer c42dc09c0e Merge branch 'chore/61-write-protocol-document' into 'main'
Write protocol document outline and document existing commands

Closes #61

See merge request cs108-fs26/Gruppe-13!89
2026-04-09 14:46:12 +02:00
Lars Simon Winzer 5e15ad359d Docs: Correct spelling and grammar 2026-04-09 14:38:39 +02:00
jk a5427a232f Merge branch 'main' into feat/game-ui
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/CasinoGameUI.java
2026-04-09 14:37:59 +02:00
Lars Simon Winzer 2350ddf1c4 Docs: Add examples to copy n' paste exmaple and all existing documented commands 2026-04-09 14:34:32 +02:00
Jona Walpert ad81479bcd Add: first part of the powerpoint presentation for MS4
Refs #62
2026-04-09 14:24:23 +02:00
Lars Simon Winzer 62bc75b46b Docs: Write documentation for already existing commands and pre-execution checks 2026-04-09 14:21:18 +02:00
Lars Simon Winzer 8bcd4dd033 Docs: Update copy n' paste command section with enum example, and error response 2026-04-09 14:09:24 +02:00
Julian Kropff e374be4e31 Add: dealer chip images 2026-04-09 14:07:33 +02:00
Julian Kropff d939b0da67 Add: background card image 2026-04-09 13:57:24 +02:00
Lars Simon Winzer 0afa1d65e9 Docs: Link to protocol document from section README 2026-04-09 13:39:26 +02:00
Lars Simon Winzer 259173a809 Docs: Initial protocol document outlining execution pipeline with possible error responses 2026-04-09 13:39:07 +02:00
Julian Kropff ea987243b0 Merge branch 'feat/client-communication' into feat/game-ui 2026-04-09 13:35:55 +02:00
Jona Walpert 8a6c573bde Docs: 9.4 Small Teammeating 2026-04-09 12:15:19 +02:00
Jona Walpert 139626520b Docs: game rules description added for MS-4 2026-04-09 12:08:51 +02:00
Julian Kropff 7ca432fae6 Merge branch 'feat/gameui' into 'main'
Feat/gameui

See merge request cs108-fs26/Gruppe-13!88
2026-04-09 08:57:23 +00:00
Julian Kropff a99cf16c7e Fix: checkstyle issues 2026-04-09 10:53:49 +02:00
Julian Kropff e5f814b853 Merge branch 'main' into feat/gameui 2026-04-09 10:47:28 +02:00
Jona Walpert b205b25b48 Feat: Adds functionality to periodically refresh lobbies to update lobby GUI screen 2026-04-09 10:43:25 +02:00
Jona Walpert df31c307fe Fix: Comment out faulty Unit Test 2026-04-09 10:42:45 +02:00
Lars Simon Winzer 5abb46b915 Merge branch 'feat/58-extract-responsedispatcher-field-into-commandhandler' into 'main'
Extract ResponseDispatcher field into constructor of CommandHandler

Closes #58

See merge request cs108-fs26/Gruppe-13!87
2026-04-08 19:16:15 +02:00
Lars Simon Winzer 61e77be35c Docs: Write JavaDoc for newly added constructor 2026-04-08 19:13:10 +02:00
Lars Simon Winzer 01934b76f3 Refactor: Existing handler to using constructor of superclass 2026-04-08 19:12:36 +02:00
Lars Simon Winzer 0ddb65e870 Add: ResponseDispatcher field to CommandHandler 2026-04-08 19:11:49 +02:00
Lars Simon Winzer 795830cf02 Merge branch 'feat/57-pre-execution-checks-for-commandhandler' into 'main'
Add pre-execution checks with CommandHandlerExecutor to CommandHandler

Closes #57

See merge request cs108-fs26/Gruppe-13!86
2026-04-08 18:58:20 +02:00
Lars Simon Winzer 3de20e3d6c Docs: Remove unnecessary generic type parameter in JavaDoc from execute method in CommandHandlerExecutor 2026-04-08 18:54:12 +02:00
Lars Simon Winzer e23a9817e2 Refactor: Rename file to match class name 2026-04-08 18:31:44 +02:00
Lars Simon Winzer 1b3ba0000a Refactor: Correct naming for UserLoggedInCheck 2026-04-08 18:27:10 +02:00
Lars Simon Winzer 6ee2c4f901 Docs: Add to the command deep-dive by adding a section for the HandlerCheck and CommandHandlerExecutor, including diagrams 2026-04-08 18:19:55 +02:00
Lars Simon Winzer eb2a679868 Docs: Modify guide on implementing a command by mentioning pre-execution checks 2026-04-08 18:18:17 +02:00
Lars Simon Winzer 15062df711 Docs: Write JavaDoc for added or modified components 2026-04-08 18:06:55 +02:00
Lars Simon Winzer ffca8e5e29 Add: UserLoggedinCheck to validate that Session has User associated with it 2026-04-08 17:45:36 +02:00
Lars Simon Winzer 77d9ded3d3 Refactor: Change CommandHandler implementations to extend the abstract class 2026-04-08 17:24:26 +02:00
Lars Simon Winzer ebb2e267bf Add: Implement CommandHandlerExecutor for evaluation of pre-execution checks in CommandRouter 2026-04-08 17:23:38 +02:00
Lars Simon Winzer a62da1235d Refactor: Move CommandRouter dependency from SessionManager to NetworkManager 2026-04-08 17:10:20 +02:00
Lars Simon Winzer cf09a70fb8 Add: Change CommandHandler to abstract class and add support for pre-execution checks 2026-04-08 16:49:47 +02:00
Lars Simon Winzer a747c2de56 Add: HandlerCheck functional interface for pre-execution checks 2026-04-08 16:47:40 +02:00
Jona Walpert f3ecbd12f5 Feat: Add username text field to main Lobby 2026-04-08 13:34:26 +02:00
Jona Walpert 5d4d2655ef Add: Supply gameUI with client service at game startup 2026-04-08 13:33:31 +02:00
Jona Walpert d855f2d568 Feat: add offline mode to prevent errors when trying to send requests to not connected server 2026-04-08 13:29:39 +02:00
Jona Walpert ca782b389e Docs: Translate Javadoc and comments to English 2026-04-08 13:26:36 +02:00
Jona Walpert 04bf7ba545 Refactor: move login function from coreClient to LobbyClient 2026-04-08 13:22:24 +02:00
Mathis Ginkel 509aa71d9f Add: Implement Commands for Chat Protocol 2026-04-07 22:15:23 +02:00
Mathis Ginkel d1d2fb30e8 Fix: small changes to ChatUI 2026-04-07 22:11:20 +02:00
Jona Walpert aca61cbd52 Add: first (non functioning) modified version of lobby button controlelr with abckend conenction 2026-04-07 22:11:20 +02:00
Julian Kropff 73756b7d24 Add: documentation for client network architecture 2026-04-07 22:11:20 +02:00
Julian Kropff 60ed1ced91 Add: initial client structure for game and network 2026-04-07 22:11:20 +02:00
Mathis Ginkel eda51f8ac5 Add: CoreClient and ChatClient 2026-04-07 22:11:20 +02:00
Julian Kropff ce71992e17 Add: Client Network Architecture Documentation 2026-04-07 22:11:20 +02:00
Mathis Ginkel a9dcd79b38 Add: client chat architecture for lobby and global chat 2026-04-07 22:11:20 +02:00
Mathis Ginkel 79831b046c Fix: small changes in ClientService 2026-04-07 22:11:20 +02:00
Mathis Ginkel 61e54f282e Resolve Conflicts 2026-04-07 22:11:20 +02:00
Mathis Ginkel 8fb2657cdd Merge remote-tracking branch 'origin/main' 2026-04-07 22:10:52 +02:00
Lars Simon Winzer b60374f7e5 Merge branch 'chore/56-javadoc-for-login-command-components' into 'main'
Write JavaDoc for components related to LOGIN command

Closes #56

See merge request cs108-fs26/Gruppe-13!85
2026-04-07 20:15:46 +02:00
Lars Simon Winzer 160ad8f2bb Docs: Write JavaDoc for components related to LOGIN command 2026-04-07 20:12:22 +02:00
Lars Simon Winzer 06c5e5ab83 Merge branch 'fix/55-user-can-login-multiple-times' into 'main'
Prevent multiple logins by checking for existing user session

Closes #55

See merge request cs108-fs26/Gruppe-13!84
2026-04-07 14:25:12 +02:00
Lars Simon Winzer d4722989d9 Add: Prevent multiple logins by checking for existing user session 2026-04-07 14:22:09 +02:00
Lars Simon Winzer 8a2d0607f8 Merge branch 'feat/41-add-serverside-logout-command' into 'main'
Add serverside LOGOUT command

Closes #41

See merge request cs108-fs26/Gruppe-13!83
2026-04-07 14:11:24 +02:00
Lars Simon Winzer 7c9cf3e00d Style: Variable naming 2026-04-07 14:09:35 +02:00
Lars Simon Winzer 5ab29a3337 Docs: Write JavaDoc for added components 2026-04-07 14:02:44 +02:00
Lars Simon Winzer 4789273d8f Add: Send ErrorResponse with 'NO_USER_ASSOCIATED' code when no user is associated with the session 2026-04-07 14:02:18 +02:00
Lars Simon Winzer 4c10bc7ab0 Refactor: Use removeBySessionId method instead of onDisconnect handler 2026-04-07 13:39:44 +02:00
Lars Simon Winzer dfbaaac4f0 Merge branch 'main' into 'feat/41-add-serverside-logout-command' 2026-04-07 13:36:07 +02:00
Lars Simon Winzer 78e0599182 Merge branch 'feat/54-sessionregistry-remove-method' into 'main'
Add remove methods to SessionRegistry

Closes #54

See merge request cs108-fs26/Gruppe-13!82
2026-04-07 13:35:09 +02:00
Lars Simon Winzer 822dfe778d Style: Apply Spotless 2026-04-07 13:31:26 +02:00
Lars Simon Winzer ee694b8168 Docs: Write JavaDoc for newly added methods 2026-04-07 13:30:09 +02:00
Lars Simon Winzer 36f07880e5 Refactor: Use internal remove method 2026-04-07 13:28:12 +02:00
Lars Simon Winzer 22dc2c7e54 Add: Methods to remove user by UserId, SessionId and Username from SessionRegistry 2026-04-07 13:27:12 +02:00
Lars Simon Winzer 9a7b1c4dea Add: LOGOUT command in composition root 2026-04-07 12:45:52 +02:00
Lars Simon Winzer 8376f681b1 Add: LogoutHandler for processing logout commands 2026-04-07 12:40:51 +02:00
Lars Simon Winzer fa0ac684f1 Add: LogoutParser for parsing logout requests 2026-04-07 12:31:48 +02:00
Lars Simon Winzer 4ff28932b4 Add: LogoutRequest for handling logout commands 2026-04-07 12:30:40 +02:00
Lars Simon Winzer fee71a8a2c Merge branch 'feat/40-add-serverside-login-command' into 'main'
Add serverside LOGIN-command

Closes #40

See merge request cs108-fs26/Gruppe-13!81
2026-04-07 12:23:33 +02:00
Lars Simon Winzer 708f6c5773 Add: Integrate LOGIN command in composition root 2026-04-07 12:12:33 +02:00
Lars Simon Winzer be173f2847 Add: LoginHandler to execute and respond to LoginRequest 2026-04-07 12:10:45 +02:00
Lars Simon Winzer 7eda64b5c3 Add: LoginResponse containing assigned username and UserId 2026-04-07 11:58:43 +02:00
Lars Simon Winzer 8580a2803c Add: LoginParser to check for required parameter and construct LoginRequest 2026-04-07 11:54:54 +02:00
Lars Simon Winzer 68a69b865e Add: LoginRequest storing requested username for login 2026-04-07 11:51:39 +02:00
Lars Simon Winzer 60e15e12fa Merge branch 'chore/53-add-tex-to-gitignore' into 'main'
Add tex to gitignore

Closes #53

See merge request cs108-fs26/Gruppe-13!80
2026-04-05 15:04:33 +02:00
Lars Simon Winzer d757c2a317 Add: Move gradle.properties to gradle section 2026-04-05 15:01:07 +02:00
Lars Simon Winzer 2152560dea Add: Move gradle to own section 2026-04-05 14:58:45 +02:00
Lars Simon Winzer 101e21d568 Add: TeX to gitignore 2026-04-05 14:58:29 +02:00
Julian Kropff 6693d57688 Merge remote-tracking branch 'origin/main' into feat/gameui 2026-04-05 13:36:22 +02:00
Mathis Ginkel 55a6d4beed Merge remote-tracking branch 'origin/main' 2026-04-05 13:12:39 +02:00
Lars Simon Winzer aca8924f15 Merge branch 'chore/50-change-used-markdown-embed-technique' into 'main'
Replace SVG with PNG graphics in documentation

Closes #50

See merge request cs108-fs26/Gruppe-13!79
2026-04-05 12:48:42 +02:00
Lars Simon Winzer d3009a422c Docs: Replace SVG with PNG graphic 2026-04-05 12:43:59 +02:00
Julian Kropff 5304128094 Merge branch 'feat/game-engine' into 'main'
Feat/Game Engine

See merge request cs108-fs26/Gruppe-13!77
2026-04-05 09:26:12 +00:00
Julian Kropff 828e2f3131 Fix: checkstyle issues 2026-04-05 11:21:27 +02:00
Julian Kropff bf7ac4fc34 Fix: formatting and checkstyle issues 2026-04-05 11:15:26 +02:00
Lars Simon Winzer a9bf0635a2 Merge branch 'main' into 'chore/50-change-used-markdown-embed-technique' 2026-04-05 11:14:06 +02:00
Lars Simon Winzer ae3db3f829 Merge branch 'feat/51-export-plantuml-to-png-script' into 'main'
Add script to export plantuml diagram to png format

Closes #51

See merge request cs108-fs26/Gruppe-13!78
2026-04-05 11:09:46 +02:00
Lars Simon Winzer 25837fc869 Add: VSCode task for plantuml to png export script 2026-04-05 11:04:23 +02:00
Julian Kropff d4e69d26d7 Merge remote-tracking branch 'origin/main' into feat/game-engine 2026-04-05 11:04:19 +02:00
Lars Simon Winzer 6456e86f07 Add: Script to export plantuml diagrams to pngs 2026-04-05 11:03:12 +02:00
Lars Simon Winzer b043127ced Add: Add filename suffix to existing plantuml to svg export script 2026-04-05 11:02:29 +02:00
Julian Kropff f7dc3d1a8e Fix: Typo in GameController unit tests for game engine 2026-04-04 23:50:58 +02:00
Julian Kropff 585a78fbcc Add: GameController unit tests for game engine 2026-04-04 23:38:45 +02:00
Julian Kropff 769105b87d Add: rule system for game engine 2026-04-04 23:38:19 +02:00
Julian Kropff a20ba7cef5 Add: hand evaluation for game engine 2026-04-04 23:37:32 +02:00
Julian Kropff fb71c6de7b Add: game engine and flow control 2026-04-04 23:35:43 +02:00
Julian Kropff 041a5f135a Add: player actions for game engine 2026-04-04 23:34:01 +02:00
Julian Kropff 700e8de39d Add: core domain models for game engine 2026-04-04 23:31:34 +02:00
Lars Simon Winzer a0319af3b3 Fix: Revert and use relative path instead 2026-04-04 22:09:20 +02:00
Lars Simon Winzer b8a0c224cf Fix: Replace markdown native image embed with html tag 2026-04-04 22:06:09 +02:00
Julian Kropff b99facab3b Docs: fix Game Engine architecture Documentation 2026-04-04 19:10:19 +02:00
Lars Simon Winzer 6d19b89351 Merge branch 'chore/49-serverside-documentation-for-handling-request' into 'main'
Write documentation on how to implement additional commands on the server

Closes #49

See merge request cs108-fs26/Gruppe-13!76
2026-04-04 18:14:06 +02:00
Lars Simon Winzer b9a8448b53 Docs: Write guide on implementing a custom command and link to it from README 2026-04-04 18:08:03 +02:00
Julian Kropff 59c47267ad Docs: fix Game Engine implementation Documentation 2026-04-04 16:13:23 +02:00
Lars Simon Winzer f971e6ad5b Docs: Write technical deep dive for commands and link to it from README
Includes puml diagrams and exported svgs
2026-04-04 15:51:29 +02:00
Lars Simon Winzer 4317b63a87 Docs: Write README for commands section of serverside documentation 2026-04-04 14:36:46 +02:00
Julian Kropff 413999a226 Add: Game Engine implementation Documentation 2026-04-04 11:51:26 +02:00
Julian Kropff ee1e474a9d Docs: Fix typos in poker rules description 2026-04-04 11:47:12 +02:00
Julian Kropff 8c0dd1a481 Docs: A simple description of the poker rules with an example, English version 2026-04-04 10:24:08 +02:00
Julian Kropff 3640c1117d Docs: update client network architecture documentation 2026-04-04 10:21:07 +02:00
Julian Kropff e86de25b34 Add: A simple description of poker rules with an example 2026-04-03 14:35:08 +02:00
Jona Walpert 42b5344059 Test: Add in-process TestServer and update LobbyButtonGridManagerTest
Add TestServer that speaks the RawPacket/TcpTransport protocol for CREATE_LOBBY,
GET_LOBBY_STATUS and JOIN_LOBBY. Update LobbyButtonGridManagerTest to start the
TestServer and exercise a real `ClientService(host, port)`, enabling integration-style
tests of the client->transport->server roundtrip without an external server.

Refs #36
2026-04-02 22:28:12 +02:00
Jona Walpert 76e62b3cff Feat: Accept ClientService and delegate to LobbyClient
Add constructor overload that accepts ClientService and constructs a LobbyClient.
Avoids implicit host/port lookup in UI code; caller controls network config.
Keeps rendering/status behavior unchanged (async updates, deterministic ordering).
2026-04-02 22:26:14 +02:00
Jona Walpert 1070b5d4b9 Chore(startup): Propagate server ip:port to UI via system properties
ClientApp.start parses <ip>:<port>, sets `casono.server.host` / `casono.server.port` and forwards the original launch arg to the JavaFX launcher.
Casinomainui reads JavaFX launch args and exposes the same system properties.
CasinomainuiController reads those properties and constructs `ClientService(host, port)` (no hardcoded defaults)."
2026-04-02 22:12:48 +02:00
Jona Walpert 4daf6ff4a2 Fix: Sort button IDs before iterating map for deterministic rendering
Copy mapping.keySet() to a List and call Collections.sort(...) before iterating.
Ensures stable button placement and reproducible image updates (render + update)
2026-04-02 22:00:18 +02:00
Mathis Ginkel 7b1b35698c Merge remote-tracking branch 'origin/main' 2026-04-02 22:00:06 +02:00
Jona Walpert 3153f7027d fix: temporyy fix for NPE and wrong naming 2026-04-02 18:50:20 +02:00
Jona Walpert b5d19d915b Add: first (non functioning) modified version of lobby button controlelr with abckend conenction 2026-04-02 16:31:27 +02:00
Julian Kropff 09c19c2602 Add: documentation for client network architecture 2026-04-02 16:10:33 +02:00
Julian Kropff 77c7f7c0a5 Add: initial client structure for game and network 2026-04-02 16:08:24 +02:00
Lars Simon Winzer 5568c8a073 Merge branch 'feat/39-add-serverside-check-nick-command' into 'main'
Add serverside CHECK_NICK-command

Closes #39

See merge request cs108-fs26/Gruppe-13!75
2026-04-02 15:10:28 +02:00
Lars Simon Winzer 93dba00a4d Style: Apply Spotless 2026-04-02 15:02:58 +02:00
Lars Simon Winzer de11d673dc Docs: Write JavaDoc for added components 2026-04-02 15:02:00 +02:00
Lars Simon Winzer 72e3d257ff Add: Register CheckUsernameHandler in composition root 2026-04-02 14:35:56 +02:00
Lars Simon Winzer 5ef2fa5df1 Refactor: Change UsernameAvailability from public to package-private access 2026-04-02 14:34:24 +02:00
Lars Simon Winzer 5fa478c440 Add: CheckUsernameHandler getting User from UserRegistry and determining availablity 2026-04-02 14:33:59 +02:00
Lars Simon Winzer 9087f009d3 Add: CheckUsernameResponse containing username availability field 2026-04-02 14:33:26 +02:00
Lars Simon Winzer bfbf4b2015 Add: UsernameAvailability enum with availability states 2026-04-02 14:28:56 +02:00
Lars Simon Winzer ea26e371c2 Merge branch 'main' into 'feat/39-add-serverside-check-nick-command' 2026-04-02 14:24:32 +02:00
Lars Simon Winzer cf64f11912 Merge branch 'feat/47-sessionregistry-get-by-userid-and-username' into 'main'
Add additional getters to SessionRegistry with UserId and username as key

Closes #47

See merge request cs108-fs26/Gruppe-13!74
2026-04-02 14:23:42 +02:00
Lars Simon Winzer 415ad754df Style: Apply Spotless 2026-04-02 14:18:09 +02:00
Lars Simon Winzer a9878da3f2 Docs: Write JavaDoc for changed components 2026-04-02 14:17:45 +02:00
Lars Simon Winzer f91fa698f3 Refactor: Rename user lookup methods from 'find' to 'get' prefix 2026-04-02 14:12:13 +02:00
Lars Simon Winzer 5b70fb89ef Add: Implement methods to find users by UserId and username 2026-04-02 14:11:14 +02:00
Lars Simon Winzer 7a9114045f Merge branch 'main' into 'feat/39-add-serverside-check-nick-command' 2026-04-02 13:50:39 +02:00
Lars Simon Winzer 95e3474c8c Merge branch 'fix/46-sessionreader-catch-missingparameterexception' into 'main'
Modify SessionReader to explicitly catch MissingParameterException and respond with ErrorResponse to request

Closes #46

See merge request cs108-fs26/Gruppe-13!73
2026-04-02 13:48:26 +02:00
Lars Simon Winzer 528a40b394 Style: Apply Spotless 2026-04-02 13:45:14 +02:00
Lars Simon Winzer f95d9174f1 Add: Handle MissingParameterException in SessionReader and respond to request 2026-04-02 13:44:51 +02:00
Lars Simon Winzer 07587340d4 Add: Register CheckUsernameParser in composition root 2026-04-02 13:30:22 +02:00
Lars Simon Winzer 3b44e58505 Add: CheckUsernameParser to check for required parameter 2026-04-02 13:26:27 +02:00
Lars Simon Winzer 35c8590c57 Add: CheckUsernameRequest containing username to check for availability 2026-04-02 13:10:01 +02:00
Lars Simon Winzer f2df06d21a Merge branch 'feat/38-add-serverside-ping-command' into 'main'
Add serverside PING-command

Closes #38

See merge request cs108-fs26/Gruppe-13!72
2026-04-02 12:45:55 +02:00
Lars Simon Winzer 10347b3ed4 Style: Correct method naming 2026-04-02 12:43:05 +02:00
Lars Simon Winzer 87b2dcfc2c Docs: Add JavaDoc to newly added components 2026-04-02 12:27:11 +02:00
Lars Simon Winzer 707477bd73 Add: Integrate PingParser and PingHandler into helper function in composition root 2026-04-02 12:15:01 +02:00
Lars Simon Winzer dafa95af41 Add: PingHandler to execute PingRequest and dispatch Response 2026-04-02 12:09:29 +02:00
Lars Simon Winzer b445b019a1 Add: PingParser to parse PrimitiveRequest into PingRequest 2026-04-02 12:09:01 +02:00
Lars Simon Winzer 92a2ffe054 Add: PingRequest for ping request 2026-04-02 12:08:40 +02:00
Mathis Ginkel 6f80501ea2 Add: CoreClient and ChatClient 2026-04-02 11:16:40 +02:00
Julian Kropff 45cd54b981 Add: Client Network Architecture Documentation 2026-04-02 10:54:47 +02:00
Mathis Ginkel 3427c661cf Merge branch 'feat/client-chat' into feat/client-communication
# Conflicts:
#	src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/chatui/ChatController.java
2026-04-02 10:31:28 +02:00
Mathis Ginkel ff07843e0a Fix: small changes in ClientService 2026-04-02 10:22:51 +02:00
Mathis Ginkel cc33411911 Add: basic chat functionality 2026-04-02 10:20:03 +02:00
Mathis Ginkel f721a26e53 Merge remote-tracking branch 'origin/main' 2026-04-02 10:14:23 +02:00
Lars Simon Winzer 948484853c Merge branch 'chore/44-publish-outreach-as-gitlab-pages' into 'main'
Tested if gitlab instance has enabled gitlab pages

Closes #44

See merge request cs108-fs26/Gruppe-13!71
2026-04-01 22:34:14 +02:00
Lars Simon Winzer 521982f7fc Revert "Ci: Add GitLab Pages deployment job for outreach website"
This reverts commit 0e9cf6ae74.
2026-04-01 22:27:25 +02:00
Lars Simon Winzer 0e9cf6ae74 Ci: Add GitLab Pages deployment job for outreach website 2026-04-01 22:17:02 +02:00
Jona Walpert 120b55f5cc Merge branch 'feat/ui-images' into 'main'
Feat/ui images

See merge request cs108-fs26/Gruppe-13!70
2026-04-01 16:24:48 +00:00
Jona Walpert 5dd620116a Chore: Move old poker chip images to old_images folder 2026-04-01 18:21:17 +02:00
Jona Walpert f4c20e1725 Chore: Rename chip images to lobby button naming scheme 2026-04-01 18:18:25 +02:00
Julian Kropff 0c6595a58b Add: red poker chip images 2026-04-01 17:41:05 +02:00
Julian Kropff 936463c8f1 Add: green poker chip images 2026-04-01 17:40:55 +02:00
Jona Walpert 4c203b279c Merge branch 'chore/42-translate-multiple-client-components-to-english' into 'main'
Chore/42 translate multiple client components to english

Closes #42

See merge request cs108-fs26/Gruppe-13!69
2026-04-01 12:26:50 +00:00
Jona Walpert 983f2cca5e Style: fix checkstyle errors 2026-04-01 14:24:34 +02:00
Jona Walpert 56ba5b81ae Docs: translate client side components to english. This includes comments and javaDoc 2026-04-01 13:48:24 +02:00
Julian Kropff c600b6422d Style: translate comments to english 2026-04-01 13:37:51 +02:00
Lars Simon Winzer 20e8491cff Merge branch 'feat/35-make-dispatch-method-of-responsedispatcher-unchecked' into 'main'
Refactor dispatch method of ResponseDispatcher to be unchecked

Closes #35

See merge request cs108-fs26/Gruppe-13!67
2026-04-01 13:04:14 +02:00
Julian Kropff 01a72a6719 Style: translate comments to english 2026-04-01 13:02:14 +02:00
Lars Simon Winzer 3b7b53d973 Style: Apply Spotless 2026-04-01 12:49:56 +02:00
Lars Simon Winzer df0f8ca44c Add: Handle ResponseDispatchException in SessionReader 2026-04-01 12:49:07 +02:00
Lars Simon Winzer ae98334c56 Docs: Modify JavaDoc to match changes 2026-04-01 12:46:51 +02:00
Lars Simon Winzer 4deeace547 Refactor: dispatch method of ResponseDispatcher is now unchecked and throws ResponseDispatchException 2026-04-01 12:46:14 +02:00
Lars Simon Winzer 68e8bc76b2 Add: Wrapper ResponseDispatchException for ResponseDispatcher 2026-04-01 12:44:37 +02:00
Jona Walpert cb65ad2ed0 Merge branch 'feat/ui-switch-lobby-game' into 'main'
Feat/ui switch lobby game

See merge request cs108-fs26/Gruppe-13!66
2026-04-01 10:34:31 +00:00
Jona Walpert 1d322f5cd8 Style: Fix checkstyle for failed pipeline 2026-04-01 12:31:58 +02:00
Jona Walpert 40ea45460e Docs: JavaDoc for client side standard constructors 2026-04-01 11:44:46 +02:00
Jona Walpert 60f326c4d5 Style: line length checkstyle fix 2026-04-01 11:34:55 +02:00
Jona Walpert 2906c59f25 Merge branch 'main' into 'feat/ui-switch-lobby-game' 2026-04-01 11:24:39 +02:00
Lars Simon Winzer 6736345cbe Merge branch 'feat/34-make-response-use-requestcontext' into 'main'
Refactor response classes to use RequestContext instead of SessionId + request id

Closes #34

See merge request cs108-fs26/Gruppe-13!64
2026-03-31 20:50:07 +02:00
Lars Simon Winzer 307c234c91 Docs: Fix javaDoc comments to match changes 2026-03-31 20:47:46 +02:00
Lars Simon Winzer 2ad2981724 Docs: Improve javaDoc for getSessionId method in Response 2026-03-31 20:36:40 +02:00
Lars Simon Winzer 945418798b Refactor: Replace dedicated fields for SessionId and request id with RequestContext 2026-03-31 20:35:29 +02:00
Lars Simon Winzer 34d782e252 Refactor: Use RequestContext in SessionReader when instantiating responses 2026-03-31 20:32:11 +02:00
Lars Simon Winzer 665e006b89 Refactor: Update response classes to use RequestContext instead of SessionId + request id
BREAKING CHANGES
2026-03-31 20:27:36 +02:00
Julian Kropff da23a30ca5 Add: Background image 2026-03-31 19:46:58 +02:00
Julian Kropff d762f7bb2b Add: Background image 2026-03-31 19:46:28 +02:00
Julian Kropff 605260f0d0 Add: Diamond Card images 2026-03-31 19:36:15 +02:00
Julian Kropff 27913854c5 Add: Heart Card images 2026-03-31 19:35:50 +02:00
Lars Simon Winzer 56667bfb12 Merge branch 'feat/33-commandparser-generic-type' into 'main'
Refactor CommandParser interface to use generic type extending Request

Closes #33

See merge request cs108-fs26/Gruppe-13!63
2026-03-31 19:32:33 +02:00
Lars Simon Winzer 3a0248e0c3 Refactor: Update CommandParser interface to use generic type 2026-03-31 19:29:08 +02:00
Julian Kropff ecd66a4ee9 Add: Pik Card images 2026-03-31 19:27:07 +02:00
Julian Kropff ae8eccb158 Add: Cross Card images 2026-03-31 19:20:45 +02:00
Julian Kropff 7a29ce0b3b Add: Diamond Card image 2026-03-31 19:06:24 +02:00
Julian Kropff 865d5bb0dc fix: rename 2026-03-31 18:44:19 +02:00
Julian Kropff 8ee5114d37 Add: poker chip images 2026-03-31 18:42:36 +02:00
Julian Kropff c3bf2d4bb0 fix: rename 2026-03-31 17:46:28 +02:00
Julian Kropff 874df242ab Add: Pik Card image 2026-03-31 17:45:52 +02:00
Julian Kropff 06e49a756c Add: Heart Card image 2026-03-31 17:45:05 +02:00
Julian Kropff b88fdceb9f Add: Cross Card image 2026-03-31 17:44:11 +02:00
Julian Kropff 71d417c6da Add: adding the game engine documentation 2026-03-31 17:06:53 +02:00
Jona Walpert b85e87798e Fix: Update team member names in outreach website
Replaced placeholder names with correct names for Matthis and Julian in outreach/index.html.
2026-03-31 13:27:00 +02:00
Lars Simon Winzer 595800a469 Merge branch 'chore/30-javadoc-ci-job' into 'main'
Add javaDoc gradle task as job to CI pipeline

Closes #30

See merge request cs108-fs26/Gruppe-13!62
2026-03-31 13:06:47 +02:00
Lars Simon Winzer 701fa9b6ed Ci: Add javadoc gradle task as job to CI pipeline 2026-03-31 13:01:30 +02:00
Lars Simon Winzer b0b8e3b1d0 Merge branch 'chore/31-feature-request-issue-template-checklist' into 'main'
Fix minor formatting errors in the issue templates

Closes #32 and #31

See merge request cs108-fs26/Gruppe-13!61
2026-03-31 12:44:17 +02:00
Lars Simon Winzer 3af362a9e5 Chore: Fix typo in Bug Report template checklist 2026-03-31 12:39:19 +02:00
Lars Simon Winzer 65db63d3a1 Chore: Update checklist in Feature Request template 2026-03-31 12:39:03 +02:00
Lars Simon Winzer 9a81c6f1af Merge branch 'chore/29-javadoc-server-errors' into 'main'
Reflect criticial changes to JavaDoc docstrings for server

Closes #29

See merge request cs108-fs26/Gruppe-13!60
2026-03-31 12:29:21 +02:00
Lars Simon Winzer 972e46f4d0 Style: Apply Spotless 2026-03-31 12:27:17 +02:00
Lars Simon Winzer 4e9082f106 Chore: Update Javadoc for ProtocolParser 2026-03-31 12:23:43 +02:00
Lars Simon Winzer e210bd1d49 Chore: Update Javadoc for Session classes 2026-03-31 12:23:30 +02:00
Lars Simon Winzer 238cf937f4 Merge branch 'fix/28-incomplete-transmission-of-response' into 'main'
Fix incorrect order data was written by TcpTransport

Closes #28

See merge request cs108-fs26/Gruppe-13!59
2026-03-31 12:12:57 +02:00
Lars Simon Winzer e07f107384 Fix: Incorrect order data was written out 2026-03-31 12:03:45 +02:00
Lars Simon Winzer 600d10286f Merge branch 'feat/27-finalize-serverside-exception-handling' into 'main'
Finalize exception handling in SessionReader

Closes #27

See merge request cs108-fs26/Gruppe-13!58
2026-03-31 10:11:10 +02:00
Jona Walpert 5448f5683d Add: Prototype outreach website with placeholders
Initial version of the outreach landing page.
Includes placeholder and stock images and placeholder developer names for team section.
2026-03-30 23:55:12 +02:00
Jona Walpert 2cd4324c68 Merge branch 'chore/add-build-cs108-task' into 'main'
Chore: Add build-cs108 Gradle task and javadocJar

See merge request cs108-fs26/Gruppe-13!57
2026-03-30 21:36:45 +00:00
Jona Walpert 45a6b87303 Chore: Add build-cs108 Gradle task and javadocJar 2026-03-30 23:33:48 +02:00
Lars Simon Winzer c6ac3d4aff Add: Handle thrown Exceptions and respond with ErrorResponse 2026-03-30 19:38:39 +02:00
Lars Simon Winzer 73a80deb12 Merge branch 'chore/26-restructure-server-files' into 'main'
Restructure server files and folders

Closes #26

See merge request cs108-fs26/Gruppe-13!56
2026-03-30 18:59:20 +02:00
Lars Simon Winzer 2203f80490 Chore: Reflect path changes for tests 2026-03-30 18:42:19 +02:00
Lars Simon Winzer 059b706485 Chore: Move 'tokenizer' into protocol/parser section 2026-03-30 18:42:05 +02:00
Lars Simon Winzer b588f38cd5 Style: Apply Spotless 2026-03-30 18:27:17 +02:00
Lars Simon Winzer 0930fbe990 Chore: Reflect changes to folder structure in tests 2026-03-30 18:26:45 +02:00
Lars Simon Winzer 86b4a6c191 Chore: Remove leftover TODO 2026-03-30 18:23:41 +02:00
Lars Simon Winzer 6e446b665a Chore: Move 'tokenizer' into protocol section 2026-03-30 18:21:56 +02:00
Lars Simon Winzer 442a846c71 Chore: Move 'response' into protocol section 2026-03-30 18:18:22 +02:00
Lars Simon Winzer e0b791589c Chore: Move 'request' folder into protocol section 2026-03-30 18:17:11 +02:00
Lars Simon Winzer cf0cd2666c Move ResponseDispatcher to 'dispatcher' subfolder in response section 2026-03-30 18:06:43 +02:00
Lars Simon Winzer ba6ff36ee2 Chore: Move ResponseBodyBuilder to 'builder' subfolder in response section 2026-03-30 18:00:34 +02:00
Lars Simon Winzer ed24ba7214 Chore: Move command parsing to 'parsing' subfolder in command section 2026-03-30 17:54:19 +02:00
Lars Simon Winzer 52daf4f2e0 Chore: Move CommandRouter and CommandHandler to execution subfolder in command section 2026-03-30 17:52:10 +02:00
Lars Simon Winzer 050b349638 Chore: Move ProtocolParser to 'protocol' folder for protocol-level processing 2026-03-30 17:50:30 +02:00
Lars Simon Winzer d4b5010158 Chore: Rename Parameter to RequestParameter 2026-03-30 17:45:08 +02:00
Lars Simon Winzer f9519a6eb5 Chore: Move RequestParameterAccessor and related files into subfolder of request 2026-03-30 17:43:31 +02:00
Lars Simon Winzer 8b8ac9ccc0 Chore: Move request related files into own folder 2026-03-30 17:41:55 +02:00
Lars Simon Winzer b10b736321 Merge branch 'chore/23-improve-speed-of-gradle-ci-jobs' into 'main'
Enable gradle configuration cache with flag in ci and fix path issue

See merge request cs108-fs26/Gruppe-13!55
2026-03-30 14:59:41 +02:00
Lars Simon Winzer d027696580 Ci: Modify gradle-cache definition to fix path issue 2026-03-30 14:50:42 +02:00
Lars Simon Winzer 4a4af3807a Ci: Enable configuration-cache via flag and warn on problems 2026-03-30 14:46:53 +02:00
Lars Simon Winzer 978f54a57b Merge branch 'feat/22-disallow-failure-of-checkstyle-mr-job' into 'main'
Disallow failure of checkstyle linter in merge requests

See merge request cs108-fs26/Gruppe-13!54
2026-03-30 14:23:48 +02:00
Lars Simon Winzer 9d4afdc3e8 Remove: Violator dummy file 2026-03-30 14:20:01 +02:00
Lars Simon Winzer f9b866fc40 Add: Violator dummy class to test pipeline behaviour 2026-03-30 14:15:11 +02:00
Lars Simon Winzer f841eecb93 Fix: disallow failure for checkstyle job for merge requests 2026-03-30 14:13:29 +02:00
Lars Simon Winzer 5ee3f34625 Merge branch 'chore/21-fix-style' into 'main'
Fix line length code quality issue from !52

See merge request cs108-fs26/Gruppe-13!53
2026-03-30 13:31:35 +02:00
Lars Simon Winzer f467b2861f Style: Line length 2026-03-30 13:27:59 +02:00
Lars Simon Winzer cb6c9cb339 Merge branch 'feat/21-requestparameteraccessor' into 'main'
RequestParameterAccessor to allow simple access to Parameters in PrimitiveRequest

See merge request cs108-fs26/Gruppe-13!52
2026-03-30 13:22:38 +02:00
Lars Simon Winzer 9390c3503a Style: Formatting by Spotless 2026-03-30 13:02:16 +02:00
Lars Simon Winzer d990e37a68 Add: parameterKey field to ParameterParseException (docstrings included) 2026-03-30 13:01:42 +02:00
Lars Simon Winzer e6b62726bd Docs: Add JavaDoc to all new interfaces, classes and methods
Co-authored-by: Copilot
2026-03-30 12:56:15 +02:00
Lars Simon Winzer 2feb0579e2 Add: RequestParameterAccessor as utility class for simplified access of parameters of PrimitiveRequest 2026-03-30 12:40:59 +02:00
Lars Simon Winzer 160ec55957 Add: ThrowingParser interface used to implicitly convert 2026-03-30 12:39:37 +02:00
Lars Simon Winzer ed91494129 Add: Exception to throw when error during parsing occurs 2026-03-30 12:38:44 +02:00
Lars Simon Winzer db9ea45530 Add: Exception to throw when required Parameter is not found 2026-03-30 12:06:52 +02:00
Lars Simon Winzer 8d571172d5 Merge branch 'feat/15-session-disconnect-job' into 'main'
Add SessionDisconnectJob to publish DisconnectEvent when Session timeouts

Closes #15

See merge request cs108-fs26/Gruppe-13!51
2026-03-28 13:17:42 +01:00
Lars Simon Winzer 1f4ccb1033 Docs: JavaDoc for Session 2026-03-28 13:12:43 +01:00
Lars Simon Winzer fc4a88ee95 Add: SessionDisconnectJob scheduling to ServerApp 2026-03-28 13:12:30 +01:00
Lars Simon Winzer 1547eda410 Add: SessionDisconnectJob to publish DisconnectEvent when client timeouts 2026-03-28 13:11:59 +01:00
Lars Simon Winzer c1cf6c1f83 Add: getAllSessions method to SessionManager 2026-03-28 13:01:43 +01:00
Lars Simon Winzer 8313a3b777 Add: lastActivity field to Session and update from SessionReader 2026-03-28 13:01:13 +01:00
Mathis Ginkel dd721bda3f Merge remote-tracking branch 'origin/main' 2026-03-28 12:45:53 +01:00
Lars Simon Winzer 4b187fac27 Merge branch 'feat/14-commandrouter-and-commandhandler' into 'main'
Create CommandRouter and CommandHandler to execute request

Closes #17

See merge request cs108-fs26/Gruppe-13!50
2026-03-26 18:23:18 +01:00
Lars Simon Winzer 58d06fad39 Style: Line length in SessionManager 2026-03-26 18:10:32 +01:00
Lars Simon Winzer 8ed1bab067 Style: Put call to superclass constructor before variable assignment in UnknownRequestException constructor 2026-03-26 18:09:07 +01:00
Lars Simon Winzer a9ffb4daeb Style: Apply formatting by Spotless 2026-03-26 18:01:57 +01:00
Lars Simon Winzer 9a6ad9f1bb Add: Create CommandRouter at server startup and pass to SessionManager 2026-03-26 17:59:41 +01:00
Lars Simon Winzer 628e86a964 Add: Pass CommandRouter to Session and SessionReader 2026-03-26 17:58:25 +01:00
Lars Simon Winzer d25f533ee9 Add: Integrate CommandRouter into SessionManager for request routing 2026-03-26 17:57:00 +01:00
Lars Simon Winzer a520f69f3e Fix: Ensure matching type at compile-time 2026-03-26 17:56:22 +01:00
Lars Simon Winzer 52c347d233 Add: Modify CommandRouter to use generic CommandHandler type 2026-03-26 17:55:26 +01:00
Lars Simon Winzer 2004740541 Add: CommandHandler interface to be generic 2026-03-26 17:53:19 +01:00
Lars Simon Winzer fd17b49ed9 Add: CommandRouter to route Request to matching CommandHandler 2026-03-26 17:51:32 +01:00
Lars Simon Winzer d9f6838e05 Add: UnknownRequestException class to throw when encountering unknown request type 2026-03-26 17:20:25 +01:00
Lars Simon Winzer 69a5a94028 Add: CommandHandler interface for executing requests 2026-03-26 17:09:33 +01:00
Lars Simon Winzer f2f5a24bd7 Merge branch 'docs/19-create-contributing-file' into 'main'
Create CONTRIBUTING.md with guidelines and workflows

Closes #19

See merge request cs108-fs26/Gruppe-13!49
2026-03-26 14:18:35 +01:00
Lars Simon Winzer 68891815ee Docs: Create CONTRIBUTING.md with guidelines and workflows 2026-03-26 14:15:42 +01:00
Lars Simon Winzer 5a4cc25f19 Merge branch 'fix/18-resolve-issues-introduced-in-16' into 'main'
Resolve issues introduced to issue templates in last update

Closes #18

See merge request cs108-fs26/Gruppe-13!48
2026-03-26 13:19:25 +01:00
Lars Simon Winzer 9da31ac4dc Remove: Unnecessary checklist item introduced by copy & pasting from bug report issue template 2026-03-26 13:12:51 +01:00
Lars Simon Winzer 6248935355 Add: Whitespaces after environment description of bug report issue template 2026-03-26 13:11:36 +01:00
Lars Simon Winzer 97571d6fe0 Merge branch 'feat/16-rework-issue-templates-to-better-match-our-usecase' into 'main'
Rework issue templates to better match our usecase

See merge request cs108-fs26/Gruppe-13!47
2026-03-26 13:00:47 +01:00
Lars Simon Winzer 72ef67c47d Rework: Task issue template 2026-03-26 12:56:54 +01:00
Lars Simon Winzer a772f2ce01 Remove: Protocol change issue template as it is now incorporated into the others 2026-03-26 12:53:52 +01:00
Lars Simon Winzer c19e3f3229 Rework: Feature request issue templates 2026-03-26 12:52:59 +01:00
Lars Simon Winzer 085f97b37e Rework: Bug report issue templates 2026-03-26 12:48:16 +01:00
Lars Simon Winzer d51f080bad Merge branch 'feat/use-parser-dispatcher-in-reader' into 'main'
Made SessionReader invoke parsing of request with CommandParserDispatcher uppon recieving request

Closes #13

See merge request cs108-fs26/Gruppe-13!46
2026-03-25 19:39:14 +01:00
Lars Simon Winzer 4430ddb0f3 Add: Pass CommandParserDispatcher instance to session upon creation 2026-03-25 13:50:54 +01:00
Lars Simon Winzer 92e4fcb269 Add: CommandParserDispatcher field to Session and SessionReader 2026-03-25 13:50:35 +01:00
Lars Simon Winzer 6f1b6361bc Add: Create CommandParserDispatcher on startup and pass to SessionManager 2026-03-25 13:48:30 +01:00
Lars Simon Winzer b0d7dc8b30 Add: CommandParserDispatcher as field to SessionManager 2026-03-25 13:47:54 +01:00
Lars Simon Winzer 4234149b58 Merge branch 'feat/request-context-record' into 'main'
Add RequestContext to simplify creation of Request which requires SessionId and RequestId

Closes #12

See merge request cs108-fs26/Gruppe-13!45
2026-03-24 18:29:28 +01:00
Lars Simon Winzer d1510ddf8e Docs: Write JavaDoc for RequestContext 2026-03-24 18:12:02 +01:00
Lars Simon Winzer edc1b29884 Add: PrimitiveRequest takes now RequestContext instead of requestId 2026-03-24 18:11:37 +01:00
Lars Simon Winzer cdd5de620b Add: Create PrimitiveRequest from RawRequest with RequestContext 2026-03-24 18:10:15 +01:00
Lars Simon Winzer 34ad803073 Refactor: ProtocolParser to accept payload string and return RawRequest
Prior it took the RawPacket as an argument and returned an PrimitiveRequest
2026-03-24 18:07:20 +01:00
Lars Simon Winzer f4476ae1e8 Add: RawRequest record to contain command and parameters 2026-03-24 18:03:26 +01:00
Lars Simon Winzer db22f12ed5 Add: RequestContext field to abstract Request class
BREAKING CHANGE: Request is now an abstract class instead of an interface
2026-03-24 18:00:09 +01:00
Lars Simon Winzer 89753a7479 Add: RequestContext record 2026-03-24 17:58:21 +01:00
Lars Simon Winzer 03b6c30625 Merge branch 'feat/serverside-response' into 'main'
Create components to respond to client request

Closes #8

See merge request cs108-fs26/Gruppe-13!44
2026-03-24 15:02:16 +01:00
Lars Simon Winzer 9766fe52c5 Add: OkResponse class as default for successful response with no body 2026-03-24 14:34:59 +01:00
Lars Simon Winzer 696542003f Add: Detailed JavaDoc documentation for response related components
Disclaimer: The docstrings have been written with Copilot but fact-checked by me.
2026-03-24 14:33:46 +01:00
Lars Simon Winzer 676216d291 Add: ResponseDispatcher for handling response dispatching 2026-03-24 13:49:24 +01:00
Lars Simon Winzer d0b431b650 Fix: Escape single quote when masking string 2026-03-24 13:40:34 +01:00
Lars Simon Winzer a281f74789 Add: ResponseEncoder to encode Response to PrimitiveResponse 2026-03-24 13:39:06 +01:00
Lars Simon Winzer 02c82c4e95 Refactor: Responses to use new ResponseBody 2026-03-24 13:11:25 +01:00
Lars Simon Winzer 796827cbb4 Add: ResponseBody and ResponseBodyBuilder classes for building response body 2026-03-24 12:52:35 +01:00
Lars Simon Winzer e7c9063a5d Remove: Encodable as encode-method is no longer used 2026-03-24 12:33:36 +01:00
Lars Simon Winzer bcfbe06532 Add: ResponseNode and implementations to store body of response 2026-03-24 12:19:25 +01:00
Mathis Ginkel 68c7003c5d Merge remote-tracking branch 'origin/main' 2026-03-23 21:06:41 +01:00
Lars Simon Winzer eb63f6d39b Add: Base classes for all responses 2026-03-23 15:45:44 +01:00
Lars Simon Winzer 0f58b4e998 Add: Encodable interface as lowest instance 2026-03-23 15:44:58 +01:00
Lars Simon Winzer 6324c4a28c Merge branch 'main' into 'feat/serverside-response' 2026-03-23 10:41:19 +01:00
Lars Simon Winzer 900bb4f26e Merge branch 'issue/11-bump-spotless-version' into 'main'
Bumb google-java-format version from '1.25.2' to '1.35.0'

Closes #11

See merge request cs108-fs26/Gruppe-13!43
2026-03-23 10:33:19 +01:00
Lars Simon Winzer f3703e4dbd Build: Bumb google-java-format version from '1.25.2' to '1.35.0' 2026-03-23 10:28:28 +01:00
Mathis Ginkel b4f34e00f2 Merge remote-tracking branch 'origin/main' 2026-03-21 10:01:34 +01:00
Lars Simon Winzer 8d72a67b5e Merge branch 'feat/session-reader-and-writer-thread' into 'main'
Add SessionReader and SessionWriter worker threads for session

Closes #9

See merge request cs108-fs26/Gruppe-13!42
2026-03-20 17:39:44 +01:00
Lars Simon Winzer e2e01addaa Fix: Leak of SessionManager by removing both removeSession method 2026-03-20 17:32:16 +01:00
Lars Simon Winzer 94fcd88223 Fix: Avoid Race condition in create method of SessionManager 2026-03-20 17:31:44 +01:00
Lars Simon Winzer 0bb5a1e940 Fix: Remove session requested to be disconnected from sessions map 2026-03-20 17:21:36 +01:00
Lars Simon Winzer c6833b71e8 Style: Add missing 'static' keyword to static variable 2026-03-20 17:12:55 +01:00
Lars Simon Winzer b19e923356 Style: Magic number, linelength and trailing whitespace 2026-03-20 17:09:59 +01:00
Lars Simon Winzer f79f7f0ae2 Add: Useful information to log statement to ease debugging 2026-03-20 16:56:03 +01:00
Lars Simon Winzer 2ed7ae4e5d Fix: Replace logging level 'trace' with 'error' and 'warn' 2026-03-20 16:47:01 +01:00
Lars Simon Winzer 107870ff78 Remove: eventBus argument from NetworkManager creation 2026-03-20 16:46:26 +01:00
Lars Simon Winzer 9e8ea37e88 Remove: DisconnectEvent handler from NetworkManager 2026-03-20 16:37:46 +01:00
Lars Simon Winzer 699b9053eb Add: Instantiate SessionManager with provided eventManager and correct DisconnectEvent handler 2026-03-20 16:31:26 +01:00
Lars Simon Winzer 35da4d2770 Add: Make NetworkManager use SessionManager to create session 2026-03-20 16:30:38 +01:00
Lars Simon Winzer 761cf4a760 Add: DisconnectEvent handler function to SessionManager 2026-03-20 16:30:06 +01:00
Lars Simon Winzer 11a7f0036c Add: create and disconnect methods to SessionManager 2026-03-20 16:28:33 +01:00
Lars Simon Winzer 7713069496 Add: Make SessionManager use SessionHandle 2026-03-20 16:22:47 +01:00
Mathis Ginkel 26a1ba945a Merge remote-tracking branch 'origin/main' 2026-03-20 13:23:01 +01:00
Jona Walpert 738b97a849 Merge branch 'chore/gradle-properties-to-gitignore' into 'main'
Add: Gradle properties to gitignore

See merge request cs108-fs26/Gruppe-13!41
2026-03-20 10:47:02 +00:00
Jona Walpert 72da952e5a Add: Gradle properties to gitignore 2026-03-20 11:44:26 +01:00
Jona Walpert 4dcade3daf Add: Javadoc for client sided classes and methods 2026-03-20 11:41:19 +01:00
Jona Walpert f78e9dfa38 Style: Magic numbers 2026-03-20 11:07:17 +01:00
Jona Walpert af37e33f07 Style: Line length 2026-03-20 10:57:31 +01:00
Julian Kropff 3d8bad2427 Add: first three poker cards 2026-03-19 20:10:19 +01:00
Julian Kropff c88c809a2e Add: Casono logos 2026-03-19 20:09:36 +01:00
Julian Kropff ab851113e0 Add: poker chip images 2026-03-19 20:07:28 +01:00
Julian Kropff 4dd9c56e02 Add: background images 2026-03-19 20:05:05 +01:00
Julian Kropff 0e7507f2c4 Add: loading animation 2026-03-19 20:02:51 +01:00
Lars Simon Winzer 247f16e26e Add: SessionHandle to store Session and two worker threads 2026-03-19 19:01:33 +01:00
Lars Simon Winzer ec5ebe5d42 Add: SessionWriter to use queue of session and write to transport 2026-03-19 18:42:34 +01:00
Lars Simon Winzer 8db7986131 Add: PrimitiveResponse as pendant to PrimitiveRequest 2026-03-19 18:42:10 +01:00
Lars Simon Winzer 355b1cdbd4 Add: Queue to Session 2026-03-19 18:32:57 +01:00
Lars Simon Winzer c10aaf15b5 Add: Move read logic to SessionReader runnable 2026-03-19 18:09:31 +01:00
Lars Simon Winzer 7b4fd4aeae Add: Make TransportLayer accessible through get-method 2026-03-19 17:41:45 +01:00
Lars Simon Winzer f612c0b9a1 Merge branch 'chore/7-gitlab-issue-templates' into 'main'
Creation of GitLab issue templates

Closes #7

See merge request cs108-fs26/Gruppe-13!40
2026-03-19 15:57:23 +01:00
Lars Simon Winzer 918002c8cb Remove: Automatic assignment of 'server' label to protocol_change issue 2026-03-19 15:53:58 +01:00
Lars Simon Winzer 4df8befd27 Style: Cleanup and addition of checklist 2026-03-19 15:51:02 +01:00
Lars Simon Winzer 0ff4e320ba Add: Task template 2026-03-19 15:48:11 +01:00
Lars Simon Winzer 090d77054c Add: Protocol schema modification template 2026-03-19 15:46:25 +01:00
Lars Simon Winzer 1106c891aa Add: Feature request template 2026-03-19 15:33:43 +01:00
Lars Simon Winzer 2442e5a39f Add: Bug report template 2026-03-19 15:29:47 +01:00
Jona Walpert 52bbbd6181 Fix: buttons now change their size relative to screen size 2026-03-19 14:21:43 +01:00
Jona Walpert 1727aec42c Add: chatui added to lobby ui 2026-03-19 14:16:18 +01:00
Julian Kropff 8639fa420f Fix: change file names to conform convention 2026-03-19 13:27:32 +01:00
Jona Walpert 85f89a91f1 Refactor: Update unit tests for LobbyButtonTranslationManager and LobbyButtonGridManager 2026-03-19 12:54:50 +01:00
Jona Walpert 08b85af147 Add: Add: Singleton for LobbyButtonTranslationManager and changing exit button behaviour 2026-03-19 12:54:06 +01:00
Lars Simon Winzer ab82208283 Merge branch 'chore/followup-to-mr-38' into 'main'
Conform to checkstyle

See merge request cs108-fs26/Gruppe-13!39
2026-03-18 18:32:48 +01:00
Lars Simon Winzer c9884bf7fa Style: Comment length 2026-03-18 18:28:34 +01:00
Lars Simon Winzer 7ffeca75fa Style: Import order 2026-03-18 18:28:16 +01:00
Lars Simon Winzer 3581406833 Merge branch 'issue/2-inconsistency-of-linting-between-checkstyle-and-spotless' into 'main'
Align Checkstyle rules with Spotless

Closes #2

See merge request cs108-fs26/Gruppe-13!38
2026-03-18 18:23:45 +01:00
Lars Simon Winzer e1500845eb Remove: Indentation module, as Checkstyle can not match Spotless
Explanation: Spotless uses the context to calculate the required indentation
2026-03-18 17:41:38 +01:00
Lars Simon Winzer 97c2dc6a02 Docs: Add comment to LineLength regarding difference between AOSP and Google Java Style Guide 2026-03-18 17:36:53 +01:00
Lars Simon Winzer 62bfa51af5 Add: Change ImportOrder in Checkstyle to match configured styleguide in Spotless 2026-03-18 17:34:33 +01:00
Lars Simon Winzer de4a424396 Merge branch 'main' into 'issue/2-inconsistency-of-linting-between-checkstyle-and-spotless' 2026-03-18 17:23:34 +01:00
Lars Simon Winzer 63a9974de2 Merge branch 'revert-5e74b83a' into 'main'
Revert "Merge branch 'feat/client-network' into 'main'"

See merge request cs108-fs26/Gruppe-13!37
2026-03-18 17:11:14 +01:00
Lars Simon Winzer 039e3751bf Revert "Merge branch 'feat/client-network' into 'main'"
This reverts merge request !36
2026-03-18 17:08:19 +01:00
Mathis Ginkel 5e74b83a1f Merge branch 'feat/client-network' into 'main'
Feat/client network

See merge request cs108-fs26/Gruppe-13!36
2026-03-16 13:04:24 +00:00
Mathis Ginkel 5401ead198 add: Network Protocol docs 2026-03-15 22:31:10 +01:00
Mathis Ginkel 98df1dc227 add: first implementation of login 2026-03-15 22:26:19 +01:00
Mathis Ginkel d6468c9595 add: first version of client to client chat 2026-03-15 22:26:11 +01:00
ginkelmath 3809b7e0e2 Fix: update clientservice 2026-03-15 22:17:18 +01:00
ginkelmath 892f0553f6 Change protocol implementation 2026-03-15 22:17:18 +01:00
ginkelmath e533262c38 Add: First version of a Client-side Networking Service 2026-03-15 22:17:18 +01:00
Lars Simon Winzer 0d8f1ac4f7 Merge branch 'feat/messages-serverside' into 'main'
Add MessageManager to broadcast Message storing content and sender to all connected users

See merge request cs108-fs26/Gruppe-13!35
2026-03-15 20:44:08 +01:00
Lars Simon Winzer 54fd43142b Add: MessagesManager to easily distribute messages to all users (Broadcast) 2026-03-15 20:33:55 +01:00
Lars Simon Winzer 5bd88445d2 Add: Modify User to store pending incoming messages 2026-03-15 20:33:24 +01:00
Lars Simon Winzer e6c9c12e3b Add: Message send by user 2026-03-15 20:24:17 +01:00
Julian Kropff be124f4a05 Merge branch 'docs/meeting-notes' into 'main'
Add: meeting notes for 14.03.2026

See merge request cs108-fs26/Gruppe-13!34
2026-03-15 19:14:15 +00:00
Julian Kropff 85d604b978 Add: meeting notes for 14.03.2026 2026-03-15 20:03:56 +01:00
Lars Simon Winzer 47544c4f1b Merge branch 'feat/user-serverside' into 'main'
Add UserRegistry to store all existing users and UserCleanupJob to periodicly remove expired user

See merge request cs108-fs26/Gruppe-13!33
2026-03-15 20:00:58 +01:00
Lars Simon Winzer 46b1388cad Add: Create UserRegistry and schedule UserCleanupJob 2026-03-15 19:51:03 +01:00
Lars Simon Winzer 68827e177e Add: Move logger creation in CleanupJob to constructor 2026-03-15 19:49:23 +01:00
Lars Simon Winzer 0a5eb5d11c Chore: JavaDoc Docstrings 2026-03-15 19:48:55 +01:00
Lars Simon Winzer 8fae4789ad Add: Make UserRegistry use multiple Maps to accelerate lookups 2026-03-15 19:37:43 +01:00
Lars Simon Winzer 8dd99726ce Add: UserCleanupJob as runnable to remove all expired users 2026-03-15 19:29:25 +01:00
Lars Simon Winzer 1223e1a4a9 Add: Extend UserRegistry to remove Disconnected User, reassign User to new session and get all users 2026-03-15 19:27:41 +01:00
Lars Simon Winzer 9d9b6ae2c7 Add: Handler for DisconnectEvent to SessionRegistry 2026-03-15 18:57:38 +01:00
Lars Simon Winzer a7cdf995c4 Add: Timestamp to User to store time of disconnect 2026-03-15 18:44:03 +01:00
Lars Simon Winzer 82582dae83 Add: UserFactory to create new users and resolve name conflicts 2026-03-15 18:41:57 +01:00
Lars Simon Winzer 7c5a4675dd Add: UserRegistry to store all active users and grand synchronized access 2026-03-15 18:35:25 +01:00
Lars Simon Winzer 2979c91ee0 Add: User to link network to domain 2026-03-15 18:25:48 +01:00
Lars Simon Winzer 8263a1355a Add: UserId to uniquely identify user 2026-03-15 18:22:11 +01:00
Lars Simon Winzer 118869f461 Merge branch 'feat/command-parser' into 'main'
Add CommandParserDispatcher to dispatch PrimitiveRequest to matching CommandHandler

See merge request cs108-fs26/Gruppe-13!32
2026-03-15 17:21:08 +01:00
Lars Simon Winzer f7f570638b Style: Correct JavaDoc comments and remove trailing whitespaces 2026-03-15 17:06:19 +01:00
Lars Simon Winzer 80c7e1c25d Add: CommandParserDispatcher to dispatch PrimitiveRequest to match CommandParser 2026-03-15 17:04:41 +01:00
Lars Simon Winzer 135e6a5327 Add: Exception to be thrown if no matching CommandParser is found 2026-03-15 16:53:29 +01:00
Lars Simon Winzer 4e853cf35f Add: Interfaces used by the CommandParserDispatcher 2026-03-15 16:53:03 +01:00
Lars Simon Winzer f6c889c250 Merge branch 'feat/protocol-parser' into 'main'
Add ProtocolParser to parse RawPacket into PrimitiveRequest using the Tokenizer

See merge request cs108-fs26/Gruppe-13!31
2026-03-15 16:19:04 +01:00
Lars Simon Winzer 8f7c92684b Add: Use ProtocolParser in Session 2026-03-15 16:12:14 +01:00
Lars Simon Winzer a5f2ac635d Add: RequestId to PrimitiveRequest 2026-03-15 16:08:48 +01:00
Lars Simon Winzer 7ca0bcc3e0 Add: Implement ProtocolParser to parse RawPacket into PrimitiveRequest 2026-03-15 16:06:04 +01:00
Lars Simon Winzer aa508dfd6c Add: Exception thrown while parsing tokens 2026-03-15 16:00:00 +01:00
Lars Simon Winzer 9c3f62db24 Add: PrimitiveRequest created by ProtocolParser containing a list of Parameter objects 2026-03-15 15:18:38 +01:00
Lars Simon Winzer 99a7154701 Merge branch 'main' into 'feat/protocol-parser' 2026-03-15 15:01:21 +01:00
Lars Simon Winzer 2d2bdddfa8 Merge branch 'feat/server-transport-rawpacket' into 'main'
Encapsulate read data by transport layer into RawPacket

See merge request cs108-fs26/Gruppe-13!30
2026-03-15 15:00:50 +01:00
Lars Simon Winzer 0bfcbe95b0 Style: Line length of JavaDoc comment 2026-03-15 14:55:43 +01:00
Lars Simon Winzer 94a2e1f977 Add: Make interface and implementation use RawPacket 2026-03-15 14:55:29 +01:00
Lars Simon Winzer 1bfbb5c75d Add: RawPacket record to store raw data about the incomming request 2026-03-15 14:49:39 +01:00
Lars Simon Winzer 61f0a23bfa Merge branch 'feat/tokenizer' into 'main'
Add server-side tokenizer

See merge request cs108-fs26/Gruppe-13!29
2026-03-15 13:52:51 +01:00
Lars Simon Winzer 08dc94b4b0 Style: Comply with Spotless
Created issue #2 regarding this issue
2026-03-15 13:38:59 +01:00
Lars Simon Winzer ca11c135f1 Style: Bracket after 'if' and record in one-line 2026-03-15 13:28:06 +01:00
Lars Simon Winzer 60f59e03d4 Add: TokenClassifier to perform more extensive syntax verification and classify tokens 2026-03-15 13:26:59 +01:00
Lars Simon Winzer 1e794337b5 Remove: 'NEWLINE' member from TokenType enum as commands dont span over multiple lines 2026-03-15 13:08:23 +01:00
Lars Simon Winzer 3509a967a6 Add: Tokenizer does no longer classify tokens and instead returns 'RawToken's 2026-03-15 12:21:56 +01:00
Lars Simon Winzer 4c0e6aeb36 Delete: Falsly added file for rudimentary quick testing 2026-03-15 12:20:37 +01:00
Lars Simon Winzer 3e138ab84e Add: State to use RawToken 2026-03-15 12:11:59 +01:00
Lars Simon Winzer 45fd696fec Add: RawToken and RawTokenType for token representation 2026-03-15 12:08:32 +01:00
Lars Simon Winzer b898357d76 Merge branch 'main' into 'feat/tokenizer' 2026-03-14 18:24:03 +01:00
Jona Walpert 830c04a706 Merge branch 'chore/conform-ui-to-checkstyle' into 'main'
Chore/conform ui to checkstyle

See merge request cs108-fs26/Gruppe-13!28
2026-03-14 17:21:28 +00:00
Lars Simon Winzer d242aeef7c Merge branch 'main' into 'chore/conform-ui-to-checkstyle' 2026-03-14 17:58:13 +01:00
Lars Simon Winzer 71d6ac9ecc Merge branch 'issue/1-increase-allowed-method-length' into 'main'
Increase allowed MethodLength checked by Checkstyle to 60

Closes #1

See merge request cs108-fs26/Gruppe-13!27
2026-03-14 17:56:15 +01:00
Lars Simon Winzer 8415e3f155 Add: Increase allowed MethodLength to 60 2026-03-14 17:53:19 +01:00
Jona Walpert a15a0a0044 Style: apply Checkstyle fixes on client side 2026-03-14 17:35:47 +01:00
Jona Walpert e3e1da0082 Merge branch 'main' into 'chore/conform-ui-to-checkstyle' 2026-03-14 17:16:57 +01:00
Jona Walpert d1bf8e4c9a Style: Use logger instead of System.out.println 2026-03-14 17:14:41 +01:00
Lars Simon Winzer f3c34dfa7f Move: Tokenizer related tests into server server directory 2026-03-14 17:14:37 +01:00
Lars Simon Winzer 2af3fe7c35 Move: Tokenizer related files into server directory 2026-03-14 17:13:18 +01:00
Julian Kropff d01bbdec7b Merge branch 'feat/game-ui' into 'main'
Feat/game-ui

See merge request cs108-fs26/Gruppe-13!26
2026-03-14 16:05:03 +00:00
Julian Kropff 58c473fc9e Merge remote-tracking branch 'origin/main' into feat/game-ui 2026-03-14 17:00:28 +01:00
Julian Kropff c411e9c560 style: apply Checkstyle fixes 2026-03-14 16:51:18 +01:00
Julian Kropff 1c5c4c8a34 style: apply Checkstyle fixes 2026-03-14 16:48:20 +01:00
Julian Kropff 9376b1d406 style: apply Checkstyle fixes 2026-03-14 16:48:06 +01:00
Julian Kropff cb98c70562 style: apply Checkstyle fixes 2026-03-14 16:46:44 +01:00
Julian Kropff d8bfc1c8e9 style: apply Checkstyle fixes 2026-03-14 16:46:28 +01:00
Lars Simon Winzer 14c18df0eb Test: Tokenizer exception 2026-03-14 16:37:11 +01:00
Lars Simon Winzer 208a284204 Test: Tokenizer state 2026-03-14 16:33:34 +01:00
Lars Simon Winzer ef2a00268f Add: Tokenizer to tokenize provided string into tokens and perform syntax check 2026-03-14 16:13:35 +01:00
Lars Simon Winzer d403908341 Add: TokenizerException thrown during tokenization 2026-03-14 16:12:50 +01:00
Lars Simon Winzer fa54fd75c1 Add: Tokenizer state and token representation 2026-03-14 15:32:40 +01:00
Jona Walpert 50d75e2f03 Style: Checkstyle changes to LobbyUI 2026-03-14 14:48:37 +01:00
Lars Simon Winzer 3dbd3a6c15 Merge branch 'chore/conform-server-to-checkstyle' into 'main'
Edit server-side code to conform to checkstyle rules

See merge request cs108-fs26/Gruppe-13!25
2026-03-14 14:26:49 +01:00
Lars Simon Winzer 1aafc0bc4b Style: Use logger instead of System.out.println 2026-03-14 14:20:01 +01:00
Julian Kropff 2f7040485a Merge branch 'feat/game-ui' into 'main'
Feat/game-ui

See merge request cs108-fs26/Gruppe-13!24
2026-03-14 13:10:23 +00:00
jk 736cf230fb Merge branch 'main' into 'feat/game-ui' 2026-03-14 14:02:13 +01:00
Lars Simon Winzer 3ce0a44a18 Style: Trailing whitespace 2026-03-14 13:46:11 +01:00
Lars Simon Winzer 59494ea2d4 Style: Line length 2026-03-14 13:45:29 +01:00
Lars Simon Winzer 34c89b671e Style: Unnecessary spaces in JavaDoc parameter and return value labels 2026-03-14 13:44:58 +01:00
Jona Walpert bb0f805b4e Merge branch 'chore/remove-demo-code' into 'main'
chore: remove demo code from project

See merge request cs108-fs26/Gruppe-13!23
2026-03-14 12:39:19 +00:00
Lars Simon Winzer 573c5fd36d Style: Singleline JavaDoc comments 2026-03-14 13:37:04 +01:00
Jona Walpert 09ebacc1e4 chore: remove demo code from project 2026-03-14 13:36:27 +01:00
Lars Simon Winzer 7be2229280 Style: Sort imports 2026-03-14 13:33:46 +01:00
Julian Kropff 3a8dc98e91 style: update chat ui design 2026-03-14 13:31:45 +01:00
Lars Simon Winzer b731f48ba7 Merge branch 'chore/fix-spotless-indentation' into 'main'
Edit spotless gradle task to indent 4 spaces instead of 2

See merge request cs108-fs26/Gruppe-13!22
2026-03-14 13:28:34 +01:00
Lars Simon Winzer 9a88cfc945 Add: trim trailing whitespace and end with newline for spotless task 2026-03-14 13:24:48 +01:00
Lars Simon Winzer e22446bffc Fix: Use 'Android Open Source Project' indentation (4 spaces) instead of 2 2026-03-14 13:24:05 +01:00
Julian Kropff 59a4648ad6 fix: reorganize folder structure for chat components 2026-03-14 13:01:41 +01:00
Julian Kropff ec4d8bfb07 fix: update chatbox fxml 2026-03-14 11:54:14 +01:00
jk 1fe6d9ce5d add: casino browser controller 2026-03-14 11:43:01 +01:00
jk 8f5d90c538 style: update casino game ui 2026-03-14 11:41:05 +01:00
jk 8610f77386 fix: update casino game ui fxml 2026-03-14 11:38:54 +01:00
jk c38f177a16 fix: update chatbox fxml 2026-03-14 11:37:26 +01:00
jk 815caff372 add: chat controller 2026-03-14 11:34:50 +01:00
jk c441318df9 fix: update launcher logic 2026-03-14 11:33:50 +01:00
jk 7d2486d3be fix: update taskbar fxml 2026-03-14 11:31:47 +01:00
jk 18d8b68fc8 fix: update and rename taskbar controller logic 2026-03-14 11:28:02 +01:00
jk 4ecbe21602 fix: update and rename casino game ui logic 2026-03-14 11:26:30 +01:00
jk e718083010 fix: update and rename casino controller logic 2026-03-14 11:24:14 +01:00
jk b810b2187b build: add javafx.graphics and javafx.web dependencies 2026-03-14 11:20:59 +01:00
Lars Simon Winzer 5b6b58f1cc Merge branch 'chore/ci-execute-junit-tests' into 'main'
Add CI job to run unit tests on push and MR

See merge request cs108-fs26/Gruppe-13!21
2026-03-14 10:12:48 +01:00
Lars Simon Winzer 6e35c599da Ci: Add job to run test on push and mr 2026-03-14 10:06:12 +01:00
Lars Simon Winzer 66f840b269 Merge branch 'chore/ci-run-automatically' into 'main'
Let CI jobs run automatically

See merge request cs108-fs26/Gruppe-13!20
2026-03-14 09:40:36 +01:00
Lars Simon Winzer 39b6c5e13e Ci: Run different jobs on push or mr 2026-03-14 09:33:55 +01:00
Lars Simon Winzer 000a5c0d9a Merge branch 'chore/gitlab-ci-code-report' into 'main'
Add CI Job to convert checkstyle report to code quality report displayable in MR

See merge request cs108-fs26/Gruppe-13!19
2026-03-14 09:20:33 +01:00
Lars Simon Winzer 0157102ae5 Ci: Add job to execute python script and upload code quality report 2026-03-14 09:09:29 +01:00
Lars Simon Winzer a7bfb59e2f Add: Python script to convert findings of checkstyle to GitLab code report 2026-03-14 09:01:25 +01:00
Lars Simon Winzer 37faa39f10 Merge branch 'chore/gitlab-linting-formatting-pipeline' into 'main'
Add first (manual) CI jobs

See merge request cs108-fs26/Gruppe-13!18
2026-03-13 23:24:45 +01:00
Lars Simon Winzer 147f84665e Ci: Make compile-check job run independent from other jobs 2026-03-13 23:17:10 +01:00
Lars Simon Winzer 8aa71a4430 Ci: Cache gradle for faster job execution 2026-03-13 23:11:28 +01:00
Lars Simon Winzer cfeea5222d Ci: Add job to check if project compiles 2026-03-13 23:05:23 +01:00
Lars Simon Winzer fb02faffc9 Build: Add spotless plugin and add task 2026-03-13 22:57:34 +01:00
Lars Simon Winzer 815b60232c Add: ImportOrder check to checkstyle config 2026-03-13 22:56:36 +01:00
Lars Simon Winzer 28f8d17237 Ci: Attach checkstyle report as job artifact 2026-03-13 22:36:23 +01:00
Lars Simon Winzer d311553de7 Add: Suppressions config for tests 2026-03-13 22:34:41 +01:00
Lars Simon Winzer e797470ca3 Ci: Bump image for job to 'gradle:9.3.1-jdk25' 2026-03-13 17:35:42 +01:00
Lars Simon Winzer 18f17564d5 Ci: Configure GitLab ci pipeline to execute Checkstyle on manual trigger 2026-03-13 17:29:41 +01:00
Lars Simon Winzer 57010d2872 Add: Configuration file for checkstyle 2026-03-13 17:28:24 +01:00
Lars Simon Winzer 004b2e2313 Build: Add checkstyle plugin and add gradle task 2026-03-13 16:38:56 +01:00
Lars Simon Winzer 9b40396eed Merge branch 'feat/network-manager' into 'main'
Add (v1) NetworkManager, Session and Transport

See merge request cs108-fs26/Gruppe-13!17
2026-03-13 15:49:55 +01:00
Lars Simon Winzer 4bcb9a9874 Style: Newline at end of file 2026-03-13 15:46:12 +01:00
Jona Walpert 9c3114b5f3 Merge branch 'feat/lobby-ui' into 'main'
Merge 'feat/lobby-ui' back into 'main'

See merge request cs108-fs26/Gruppe-13!16
2026-03-13 14:30:32 +00:00
Jona Walpert 1cefe9c9d9 Merge branch 'chore/fix-enable-native-access-javafx' into 'main'
chore: fix JVM native access warnings for JavaFX

See merge request cs108-fs26/Gruppe-13!15
2026-03-13 14:21:53 +00:00
Jona Walpert 0e30e08247 chore: fix JVM native access warnings for JavaFX 2026-03-13 15:16:42 +01:00
Lars Simon Winzer 38133e6761 Docs: Add JavDoc for all classes and methods 2026-03-13 15:16:15 +01:00
Lars Simon Winzer 4231ca3e97 Ammend to 49019075e4 2026-03-13 15:12:06 +01:00
Jona Walpert 75567c59b2 Merge branch 'main' into 'feat/lobby-ui' 2026-03-13 14:55:43 +01:00
Jona Walpert a39775bd04 refactor: Button_ID - Lobby_ID translation is now only stored in hasmap and not in a Json file anymore 2026-03-13 14:54:47 +01:00
Lars Simon Winzer 49019075e4 Move: Network related files into respective folders 2026-03-13 14:42:19 +01:00
Jona Walpert 97a860df9e Merge branch 'chore/gradle-client-run-shortcut' into 'main'
Chore: Add client run task to gradle

See merge request cs108-fs26/Gruppe-13!14
2026-03-13 10:31:42 +00:00
Jona Walpert 0b51f4f45a Chore: Add client run task to gradle 2026-03-13 11:29:21 +01:00
Lars Simon Winzer 711de2e6aa Add: Make use of SessionManager 2026-03-12 20:13:50 +01:00
Lars Simon Winzer 74566f99cf Fix: Direct (unallowed) cast from Consumer<T> to Consumer<Object> 2026-03-12 20:12:52 +01:00
Lars Simon Winzer c301039bfc Add: SessionManager to store all active sessions 2026-03-12 19:34:46 +01:00
Lars Simon Winzer e1029932d8 Fix: 'Potential null pointer access' 2026-03-12 19:27:29 +01:00
Lars Simon Winzer db7892d9c4 Fix: 'Type safety: Unchecked cast from ...' 2026-03-12 19:26:00 +01:00
Lars Simon Winzer 7b32fe1147 Add: Event interface and implement it in DisconnectEvent, update EventBus to only allow Event type 2026-03-12 19:16:59 +01:00
Lars Simon Winzer 54588276d1 Add: Let Session publish DisconnectEvent and EventHandler subscribe and handle it 2026-03-12 19:15:25 +01:00
Lars Simon Winzer fc8a92789a Add: DisconnectEvent as record 2026-03-12 19:13:25 +01:00
Lars Simon Winzer 7fcb47ed6f Add: EventBus class for event handling and subscription management 2026-03-12 19:12:53 +01:00
Lars Simon Winzer d4bf69dc59 Refactor: Session to use TransportLayer for socket communication 2026-03-12 15:55:46 +01:00
Lars Simon Winzer b073760eef Add: TcpTransport class to implement TransportLayer 2026-03-12 15:51:35 +01:00
Lars Simon Winzer 48d77b6cbe Add: TransportLayer interface to abstract direct socket access 2026-03-12 15:47:03 +01:00
Jona Walpert 59765e33bb Test: Unit test for Translating Button IDs into backend Lobby IDs 2026-03-12 15:36:59 +01:00
Jona Walpert fa95ce1418 Test: Unit test for creating lobbies and trying to join them 2026-03-12 15:36:13 +01:00
Jona Walpert d2407d61f4 Add: Lobby display in lobby GUI with placeholder functions. 2026-03-12 15:25:18 +01:00
Jona Walpert d414c27ff2 Chore: Added Json dependency in Gradle 2026-03-12 15:23:40 +01:00
Lars Simon Winzer f4a32b1649 Add: Session Runnable to read incomming data, decode and print it 2026-03-12 13:45:30 +01:00
Lars Simon Winzer 5407e245f7 Add: Modify NetworkManager to create Session uppon recieving a new connection 2026-03-12 13:43:35 +01:00
Jona Walpert 02dc75c331 Add: Javadoc to client side files for lauching (lobby) UI, Main file 2026-03-12 11:31:41 +01:00
Julian Kropff 4989e26ac6 style(game-ui): add Casinogameui stylesheet 2026-03-12 07:31:15 +01:00
Julian Kropff 89d4cad336 feat(game-ui): add Tastbar FXML layout 2026-03-12 07:30:35 +01:00
Julian Kropff c0b6a5424a feat(game-ui): add PlayerStatus FXML layout 2026-03-12 07:28:27 +01:00
Julian Kropff f9b32bc979 feat(game-ui): add Chatbox FXML layout 2026-03-12 07:26:39 +01:00
Julian Kropff 25d145cffd feat(game-ui): add Casinogameui FXML layout 2026-03-12 07:25:09 +01:00
Julian Kropff d47084d6f5 feat(game-ui): add TaskbarController 2026-03-12 07:24:28 +01:00
Julian Kropff c87e6f1463 feat(game-ui): add Casinogamecontroller 2026-03-12 07:22:50 +01:00
Julian Kropff 23faf0f371 feat(game-ui): add Casinogameui base class 2026-03-12 07:21:16 +01:00
Julian Kropff 268cf283bd chore(launcher): start Casinogameui for development 2026-03-12 07:18:18 +01:00
Lars Simon Winzer 5ff4dcec53 Move: Session and SessionId from common to server 2026-03-11 18:53:30 +01:00
Lars Simon Winzer dac05de331 Add: Primitive first version of NetworkManager 2026-03-11 18:23:26 +01:00
Lars Simon Winzer b1ab8f3982 Merge branch 'main' into 'feat/network-manager' 2026-03-11 17:57:29 +01:00
Lars Simon Winzer 82dd5a9b8a Merge branch 'feat/log4j-logging' into 'main'
Add Log4J as Gradle dependency and configures it with the bare minimum

See merge request cs108-fs26/Gruppe-13!13
2026-03-11 17:50:08 +01:00
Lars Simon Winzer 18331a7cc3 Add: Colored log output, based on log level 2026-03-11 17:47:36 +01:00
Lars Simon Winzer a2256b2c1e Add: Jansi as gradle dependency to allow colored console output 2026-03-11 17:44:19 +01:00
Lars Simon Winzer 85c872df23 Add: Konfigure log4j with the bare minimum 2026-03-11 17:41:14 +01:00
Lars Simon Winzer 2b012aa256 Add: log4j as gradle dependency 2026-03-11 17:40:46 +01:00
jk 4879b1b464 Merge remote-tracking branch 'origin/feat/ui-structure' into feat/game-ui 2026-03-11 17:16:24 +01:00
Jona Walpert a5204eaf29 Add: Lobby UI 2026-03-11 15:16:31 +01:00
Jona Walpert 14384dea5b Merge branch 'chore--add-bin-to-gitignore' into 'main'
Add: Added "bin" to gitignore

See merge request cs108-fs26/Gruppe-13!12
2026-03-11 13:21:26 +00:00
Jona Walpert e5e93c1a65 Add: Added "bin" to gitignroe 2026-03-11 14:20:18 +01:00
Jona Walpert f1b6243d6d Merge branch 'chore/build-gradle-javafx-module-changes' into 'main'
Add javafx modules to gradle

See merge request cs108-fs26/Gruppe-13!11
2026-03-11 12:44:24 +00:00
Jona Walpert 7daae485da Chore: Added javafx modules to build.gradle file 2026-03-11 13:22:33 +01:00
Jona Walpert 3c9f19c5da Add: Game logo, placeholder abckground image 2026-03-11 13:13:42 +01:00
Jona Walpert a7e43619f8 Revert "Add: javafx modules in build.gradle"
This reverts commit 34cb17d0e4.
2026-03-11 12:35:14 +01:00
Jona Walpert 34cb17d0e4 Add: javafx modules in build.gradle 2026-03-11 12:29:31 +01:00
Lars Simon Winzer a6afbeeae1 Merge branch 'docs/networking-documentation' into 'main'
Outline of networking components as document, first revision

See merge request cs108-fs26/Gruppe-13!10
2026-03-11 11:59:22 +01:00
Lars Simon Winzer a5272b99ab Add: Include diagramm in document 2026-03-11 11:50:59 +01:00
Lars Simon Winzer fb6f14371f Add: PlantUML diagramm outlining each component 2026-03-11 11:49:46 +01:00
Lars Simon Winzer 32e4b04c87 Add: SessionId to identify each session 2026-03-11 11:43:27 +01:00
Lars Simon Winzer 22990fa35e Add: Document outlining the core components and roles in the server-side networking 2026-03-11 11:37:04 +01:00
Jona Walpert ac9e7eecff Add: Main UI, UI Launcher 2026-03-11 11:36:57 +01:00
Jona Walpert c1a4b436fe Add: Game Logo, Background Image 2026-03-11 11:35:38 +01:00
Lars Simon Winzer 0a57ac1a1e Merge branch 'chore/exclude-idea-folder' into 'main'
Exclude .idea folder in gitignore

See merge request cs108-fs26/Gruppe-13!9
2026-03-11 11:28:12 +01:00
Lars Simon Winzer a663286c0a Add: Exclude .idea folder 2026-03-11 11:27:14 +01:00
Lars Simon Winzer 3de3a2f113 Merge branch 'chore/task-to-convert-puml-to-svg' into 'main'
VSCode task to convert all .puml files to .svgs using helper script

See merge request cs108-fs26/Gruppe-13!8
2026-03-10 17:32:09 +01:00
Lars Simon Winzer bce3326a0b Add: VSCode task to export all puml files to svgs with helper script 2026-03-10 17:29:37 +01:00
Lars Simon Winzer 2183241e08 Add: Script to convert puml file to svg via plantuml 2026-03-10 17:28:31 +01:00
Lars Simon Winzer f6eb93ad16 Merge branch 'chore/restructure-docs-folder' into 'main'
Move diary and blog folder from docs to top of documents

See merge request cs108-fs26/Gruppe-13!7
2026-03-10 13:23:37 +01:00
Lars Simon Winzer 827ba59c7b Docs: Update repository structure in main README 2026-03-10 13:20:50 +01:00
Lars Simon Winzer b9878a9c33 Chore: Move 'diary' folder to top of 'documents' folder 2026-03-10 13:19:17 +01:00
Lars Simon Winzer d0ea56daa4 Chore: Move 'blog' folder to top of 'documents' folder 2026-03-10 13:18:50 +01:00
Lars Simon Winzer 4549fb4471 Merge branch 'chore/networking-blog' into 'main'
Scaffolding for future blogs

See merge request cs108-fs26/Gruppe-13!6
2026-03-10 13:04:19 +01:00
Lars Simon Winzer 86303f8b84 Docs: Delete '09-03-26_Networking' post 2026-03-10 12:53:38 +01:00
Lars Simon Winzer 2dd3ea2562 Docs: Delete documents related to '09-03-26_Network' post 2026-03-10 12:40:09 +01:00
Lars Simon Winzer 676e24e78d Add: Table of contents and 'The Language of the Network' section 2026-03-09 18:59:35 +01:00
Lars Simon Winzer d346ec4f97 Add: Blog to cover networking in its entirety 2026-03-09 18:30:08 +01:00
Lars Simon Winzer e85ae3f59f Merge branch 'main' into 'chore/networking-blog' 2026-03-09 18:23:14 +01:00
Lars Simon Winzer c4942aa714 Merge branch 'chore/task-to-convert-drawio-to-svg' into 'main'
Add bash script to mass-convert drawio files to svg

See merge request cs108-fs26/Gruppe-13!5
2026-03-09 18:13:37 +01:00
Lars Simon Winzer dc784050bf Style: Add comments and overall cleanup 2026-03-09 18:11:18 +01:00
Lars Simon Winzer 76c182313e Fix: Remove leftover variable in echo 2026-03-09 18:07:49 +01:00
Lars Simon Winzer 8579f15868 Add: 'Export drawio to SVG'-task, executable via vscode 2026-03-09 18:06:19 +01:00
Lars Simon Winzer bf6873cfd7 Add: Bash script for in-place converting all found .drawio files to svg's 2026-03-09 18:05:21 +01:00
Lars Simon Winzer 5f9a28e96c Merge branch 'chore/project-wide-vscode-folder' into 'main'
Remove .vscode folder from .gitignore and configure recommended extensions for this project

See merge request cs108-fs26/Gruppe-13!4
2026-03-09 18:02:37 +01:00
Lars Simon Winzer 64742d6aad Add: Recommended extensions for this workspace 2026-03-09 17:57:05 +01:00
Lars Simon Winzer 8e52ed21a5 Add: Remove .vscode folder from gitignore 2026-03-09 17:34:51 +01:00
Lars Simon Winzer e7b95098b2 Add: Draw.io document and exported image for the blog 2026-03-09 16:28:16 +01:00
Lars Simon Winzer d060697aa9 Add: Draw.io related files to .gitignore 2026-03-09 16:27:13 +01:00
Lars Simon Winzer ea8ac3831f Add: Subfolders in repository structure for diary and blog in main readme 2026-03-09 16:07:18 +01:00
Lars Simon Winzer b868f3289b Add: Readme explaining the purpose, format and links to existing blog posts 2026-03-09 15:38:44 +01:00
Lars Simon Winzer 9c291e4e3b Revert "Add: Readme explaining the purpose, format and links to existing blog posts"
This reverts commit 91a513e214.
2026-03-09 15:37:26 +01:00
Lars Simon Winzer 91a513e214 Add: Readme explaining the purpose, format and links to existing blog posts 2026-03-09 15:30:50 +01:00
Lars Simon Winzer 66925bc665 Add: Session interface all sessions need to conform to 2026-03-05 13:46:10 +01:00
Lars Simon Winzer ff38c9d6ef Add: SessionId class to uniquely identify session in SessionRegistry 2026-03-05 13:38:36 +01:00
Lars Simon Winzer e6b5cac53c Add: SessionId class to uniquely identify session in SessionRegistry 2026-03-05 13:28:04 +01:00
557 changed files with 37660 additions and 892 deletions
+46 -2
View File
@@ -48,6 +48,9 @@ gradle-app.setting
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Gradle properties
gradle.properties
## MacOS
# General
.DS_Store
@@ -104,5 +107,46 @@ $RECYCLE.BIN/
## Jenv
.java-version
## VSCode
.vscode
## diagrams.net / draw.io
# Draw.io temporary files
*.drawio.bkp
*.drawio.tmp
# Auto-save files
*.drawio.autosave
# Exported images (optional nur wenn du Exporte nicht versionieren willst)
*.drawio.png
*.drawio.svg
*.drawio.pdf
## IntelliJ
.idea
## bin
bin/
# LaTeX (TeX)
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
*.rubbercache
rubber.cache
+121
View File
@@ -0,0 +1,121 @@
stages:
- lint
- report
- build
- test
# Reusable definitions
.gradle-cache: &gradle-cache
variables:
GRADLE_USER_HOME: '$CI_PROJECT_DIR/.gradle-home'
cache:
key: '$CI_PROJECT_ID-gradle'
paths:
- .gradle/
- .gradle-home/
.on-commit: &on-commit
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_BRANCH'
allow_failure: true
.on-mr: &on-mr
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
allow_failure: false
# Jobs
checkstyle:
<<: [*gradle-cache, *on-commit]
stage: lint
image: gradle:9.3.1-jdk25
script:
- gradle checkstyleMain checkstyleTest --configuration-cache --configuration-cache-problems=warn
allow_failure: true
artifacts:
when: always
paths:
- build/reports/checkstyle/main.html
- build/reports/checkstyle/main.xml
- build/reports/checkstyle/test.html
- build/reports/checkstyle/test.xml
expose_as: 'Checkstyle Report'
expire_in: 1 week
checkstyle-mr:
<<: [*gradle-cache, *on-mr]
stage: lint
image: gradle:9.3.1-jdk25
script:
- gradle checkstyleMain checkstyleTest --configuration-cache --configuration-cache-problems=warn
allow_failure: false
artifacts:
when: always
paths:
- build/reports/checkstyle/main.html
- build/reports/checkstyle/main.xml
- build/reports/checkstyle/test.html
- build/reports/checkstyle/test.xml
expose_as: 'Checkstyle Report'
expire_in: 1 week
checkstyle-report:
stage: report
image: python:3.14
needs:
- job: checkstyle-mr
artifacts: true
optional: true
when: always
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- python3 scripts/convert-checkstyle-gl-report.py
artifacts:
when: always
reports:
codequality: gl-code-quality-report.json
expire_in: 1 week
compile-check:
<<: *gradle-cache
stage: build
image: gradle:9.3.1-jdk25
script:
- gradle compileTestJava --configuration-cache --configuration-cache-problems=warn
needs: []
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
allow_failure: false
- if: '$CI_COMMIT_BRANCH'
allow_failure: false
javadoc-check:
<<: [*gradle-cache, *on-mr]
stage: build
image: gradle:9.3.1-jdk25
script:
- gradle javaDoc --configuration-cache --configuration-cache-problems=warn
needs: []
test:
<<: *gradle-cache
stage: test
image: gradle:9.3.1-jdk25
script:
- gradle test --configuration-cache --configuration-cache-problems=warn
artifacts:
when: always
reports:
junit: build/test-results/test/*.xml
paths:
- build/reports/tests/test/
expose_as: 'Test Report'
expire_in: 1 week
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
allow_failure: false
- if: '$CI_COMMIT_BRANCH'
allow_failure: true
+40
View File
@@ -0,0 +1,40 @@
## Bug Report
<!-- The reccommended type is: Issue -->
### Environment
- **Branch & Commit:**
- **Operating system:**
- **How was execution started (Gradle task / IDE debug / IDE run):**
- **Java version:** `25`
- **Gradle version**: `9.3.1`
### Summary
<!-- Short, precise description of the bug -->
### Expected Behavior
<!-- What you expected to happen -->
### Actual Behavior
<!-- What actually happened instead -->
### Steps to Reproduce
<!--
1. Do this first
2. Then do that next
3. Lastly, see the unexprected ...
-->
### Stack Trace / Error Message
```
<!-- Paste stack trace or log output here -->
```
### Possible Cause / Notes
<!-- Optional: your own hypothesis about the root cause -->
### Checklist
- [ ] I reproduced the problem using the steps above
- [ ] I searched documentation for relevant information
- [ ] I added relevant labels
/label ~bug
@@ -0,0 +1,18 @@
## Feature Request
<!-- The reccommended type is: Task -->
### Summary
<!-- Brief description of the desired functionality -->
### Required workarround
<!-- Workarround required to achieve x (if applicable) -->
### Description
<!-- Detailed description of the desired behavior -->
### Checklist
- [ ] I have described the function in detail
- [ ] I searched docs for alternative implementations matching my needs
- [ ] I added relevant labels
/label ~enhancement
@@ -0,0 +1,16 @@
## Milestone Achievement
<!-- The recommended type is: Task -->
### Category
<!-- Category of the milestone (Process, Product, Presentation) -->
### Title
<!-- Title of the milestone (equal to the title in the milestone catalog (https://p9.dmi.unibas.ch/cs108/2026) -->
### Rewarded points on completion
<!-- Number of points rewarded on completion of the milestone -->
### Description of milestone
<!-- Description of the milestone (equal to the description in the milestone catalog (https://p9.dmi.unibas.ch/cs108/2026) -->
/label ~achievement
+24
View File
@@ -0,0 +1,24 @@
## Task
<!-- The reccommended type is: Task -->
### Summary
<!-- What needs to be implemented? -->
### Context
<!-- Which part of the system does it belong to? -->
<!-- Examples: Networking, Game-Engine, User interface, ... -->
### Current Progress
- [ ]
- [ ]
- [ ]
### Notes
<!-- Optional: Implementation hints, links to prior design discussions, etc. -->
### Checklist
- [ ] I outlined checkpoints describing phases of my work related to this task
- [ ] I added relevant labels
- [ ] I linked to other issues or branches that must be completed first
/label ~task
+7
View File
@@ -0,0 +1,7 @@
{
"recommendations": [
"vscjava.vscode-java-pack",
"mhutchie.git-graph",
"gitlab.gitlab-workflow",
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
+23
View File
@@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Export drawio to SVG",
"type": "shell",
"command": "./scripts/export-drawio.sh",
"problemMatcher": []
},
{
"label": "Export PlantUML to SVG",
"type": "shell",
"command": "./scripts/export-plantuml-to-svg.sh",
"problemMatcher": []
},
{
"label": "Export PlantUML to PNG",
"type": "shell",
"command": "./scripts/export-plantuml-to-png.sh",
"problemMatcher": []
}
]
}
+223
View File
@@ -0,0 +1,223 @@
# Contribution Guidelines
This document describes the conventions and workflows everyone must follow to keep the codebase consistent and the collaboration smooth.
If you notice a violation, speak to the person involved respectfully.
Since this project is part of a course at the University of Basel, the [Code of Conduct](https://www.unibas.ch/de/Universitaet/Administration-Services/Vizerektorat-People-And-Culture/Persoenliche-Integritaet/Code-of-Conduct.html) applies.
## Table of Contents
- [Contribution Guidelines](#contribution-guidelines)
- [Table of Contents](#table-of-contents)
- [Issues \& Tasks](#issues--tasks)
- [Creating an issue](#creating-an-issue)
- [During implementation](#during-implementation)
- [Collaborative work](#collaborative-work)
- [Milestone Achievements](#milestone-achievements)
- [Git Workflow](#git-workflow)
- [Creating a branch](#creating-a-branch)
- [Working on a branch](#working-on-a-branch)
- [Commit Messages](#commit-messages)
- [Rules](#rules)
- [Examples](#examples)
- [Code Style](#code-style)
- [Linter](#linter)
- [Formatter](#formatter)
- [General guidelines](#general-guidelines)
- [CI/CD Pipeline](#cicd-pipeline)
- [Before pushing](#before-pushing)
- [Merge Requests](#merge-requests)
- [Opening a MR](#opening-a-mr)
- [Merging](#merging)
- [After merging](#after-merging)
- [Be human](#be-human)
## Issues & Tasks
Every piece of work - whether a new feature, a bug fix, or a refactoring - must be tracked as an
Issue or Task in GitLab **before** any implementation begins.
### Creating an issue
1. Open a new Issue or Task using the **relevant template** provided in the repository.
2. Fill in **all fields** specified by the template thoughtfully and completely. A well-written issue is the single source of truth for the work being done - treat it accordingly.
3. Work through the **checklist** in the template before marking the issue as ready. Do not skip items.
### During implementation
- If you encounter a problem or an unexpected finding while working on an issue, record it as a **comment** on the issue. This keeps the history intact and visible to the whole team.
- **Do not restructurally edit the original description** to incorporate new information. The description reflects the intent at the time the issue was created; comments document what happened along the way.
### Collaborative work
- When multiple people are working on the same issue, **prefer issue comments over private messages** for coordination. This keeps the current status, decisions, and open questions
centrally visible and searchable.
- Before starting work that overlaps with an existing issue, check its comment thread first to avoid duplicating effort.
### Milestone Achievements
For every process and product-related milestone achievement, there is a dedicated milestone task.
- **Do not create a branch directly from a milestone task.**
- Instead, create a normal implementation task (using the regular task template) and reference the milestone task there.
- In the merge request, reference the milestone task again.
- If the milestone condition is fully met, you may use `Closing #<id>` to close the milestone task.
- If it is only partially addressed, use `Relates to #<id>` or `Contributes to #<id>` so the milestone task stays open.
Milestone tasks may, but do not have to, be assigned to a specific person.
- If multiple people are involved, contribution is tracked through linked tasks that reference the milestone task.
- For small topics, a Milestone Achievement may be assigned to one person. Others should only contribute on request and should not modify components introduced under that achievement without coordination.
## Git Workflow
We use a **feature branch -> main** strategy. The `main` branch is always in a releasable state.
### Creating a branch
We follow the [**Conventional Branch**](https://conventional-branch.github.io/) specification. Branch names follow this pattern:
```
<type>/<short-description>
```
| Type | When to use |
|------------|--------------------------------------------------|
| `feat` | New feature or capability |
| `fix` | Bug fix |
| `refactor` | Restructuring without behaviour change |
| `test` | Adding or fixing tests |
| `ci` | Pipeline, Gradle, or tooling changes |
| `docs` | Documentation only |
**Examples:**
```
feat/reconnect-command
fix/session-writer-flush
refactor/user-registry-cleanup
docs/contributing
```
### Working on a branch
Keep branches short-lived. A branch should represent one cohesive unit of work.
It is permissible to commit changes within a feature branch that cause the program to become non-functional, but these should be fixed as soon as possible. In any case, the code that is merged into `main` must be functional.
And most importantly: **Do not commit directly to `main`**.
## Commit Messages
We follow the [**Conventional Commits**](https://www.conventionalcommits.org/) specification. Every commit message must have the form:
```
<type>: <short summary>
[optional body]
```
### Rules
The summary line must be **<= 72 characters**, written in the **imperative mood** (e.g. "add", not "added" or "adds").
### Examples
```
Reat: Add RECONNECT command handler
The handler re-associates an existing User with a new Session after
a connection drop, preserving in-flight state.
```
```
Fix: Flush output stream before closing
```
```
Ci: Tighten Checkstyle failure policy to allow_failure: false
```
```
Refactor: Replace ArrayList with CopyOnWriteArrayList
```
## Code Style
Code formatting is enforced automatically. **Do not submit a MR with formatting violations.**
### Linter
We use **Checkstyle** as our linter with a custom set of rules tailored to our project.
Checkstyle runs on every pipeline. Fix all violations locally before pushing:
```bash
./gradlew checkstyleMain checkstyleTest
```
### Formatter
We use **Spotless** with the **[Google](https://google.github.io/styleguide/javaguide.html) / [AOSP Java style](https://source.android.com/docs/core/architecture/hidl/code-style?hl=en)**:
- **Indentation:** 4 spaces (no tabs)
- **Line length:** 100 characters
- No decorative blank lines directly after opening braces `{`
- Blank lines are reserved for separating logical sections within a block
Run the formatter before committing:
```bash
./gradlew spotlessApply
```
Check without applying:
```bash
./gradlew spotlessCheck
```
### General guidelines
- Add **JavaDoc** docstrings to classes, interfaces, records and methods.
- Exercise **clean architecture**
- Prefer **stateless components**
- Use **`record` types** for immutable data carriers.
- Log with **Log4J 2** (`log4j-api`). Use the appropriate level (`DEBUG` for pipeline internals, `INFO` for lifecycle events, `WARN`/`ERROR` for recoverable/unrecoverable problems).
## CI/CD Pipeline
The pipeline runs automatically on every push. It has four stages:
```
lint > report > build > test
```
| Stage | Jobs |
|----------|--------------------------------------------|
| `lint` | Spotless check, Checkstyle |
| `report` | Code Quality JSON conversion (only for mr) |
| `build` | `./gradlew assemble` |
| `test` | `./gradlew test` + JUnit result reporting |
### Before pushing
Run the full check suite locally to avoid a broken pipeline:
```bash
./gradlew spotlessCheck checkstyleMain checkstyleTest build test
```
A red pipeline blocks merging. Fix failures before creating your merge request.
## Merge Requests
### Opening a MR
- Target branch is always **`main`**.
- Fill in the MR description: what changed and why. Link the relevant issue (with 'Closing #x') if one exists.
### Merging
A MR can be merged when **all main CI pipeline stages are green** (lint, build, test).
No explicit peer approval is required, but leaving a note or question in the MR thread for non-trivial changes is encouraged.
If you spot a problem in someone else's open MR, comment - **do not push directly to their branch** and try to fix the issue yourself.
### After merging
Delete the feature branch after the MR is merged. GitLab can do this automatically via the
"Delete source branch" checkbox in the MR.
## Be human
We are all human.
We all forget things or make mistakes sometimes.
Its important that we look out for one another and **work together as a team**.
+23
View File
@@ -1,3 +1,25 @@
> [!IMPORTANT]
> ## Programming Project (CS108)
>
> - **Course:** Programmierprojekt (CS108)
> - **Semester:** FS26
> - **Institution:** University of Basel
> - **Duration:** 18 February 2026 29 June 2026
> - **Project Type:** Group Project
> - **Project members:** Mathis Ginkel, Julian Kropff, Jona Walpert and me (Lars Winzer)
>
> ### Topic
>
> As part of the *Programming Project* course (CS108) for the semester FS26 at the University of Basel, we developed a computer game implementation of the popular card game Poker.
>
> The project's focus was networking and distributed systems design. A key aspect of the implementation was the development and integration of a custom protocol specifically designed for client-server communication. This protocol handled game state synchronization, player actions, lobby and global chat functionality, and real-time updates across the network.
>
> ### Contribution Context
>
> This repository contains work created during the official duration of the course in collaboration with three other students.
>
> Further information regarding individual contributions, repository state, synchronization status, and project ownership may be documented separately within this repository.
<div align="center">
<img src="documents/images/logo.png" alt="Game Logo" width="200"/>
</div>
@@ -35,6 +57,7 @@ This protocol handles game state synchronization, player actions, lobby and glob
│ └── test/ # Unit tests
├── documents/ # Project resources and documentation
│ ├── images/ # Images for README and documentation
│ ├── diary # Diary files for each organizational meetup
│ ├── docs # Documentation
│ ├── milestones/ # Milestone deliverables (6 milestones)
│ └── (Other resources) # Additional project materials
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

+69 -1
View File
@@ -2,6 +2,9 @@ plugins {
id 'application'
id 'java'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'checkstyle'
id 'com.diffplug.spotless' version '7.0.2'
id 'jacoco'
}
group = 'ch.unibas.dmi.dbis'
@@ -23,16 +26,51 @@ repositories {
javafx {
version = "25.0.2"
modules = ['javafx.controls', 'javafx.fxml', 'javafx.base']
modules = ['javafx.controls', 'javafx.fxml', 'javafx.base', 'javafx.graphics', 'javafx.web', 'javafx.media']
}
dependencies {
// Source: https://mvnrepository.com/artifact/org.apache.logging.log4j
implementation("org.apache.logging.log4j:log4j-api:2.25.3")
runtimeOnly("org.apache.logging.log4j:log4j-core:2.25.3")
implementation("org.jspecify:jspecify:1.0.0")
// Source: https://mvnrepository.com/artifact/org.fusesource.jansi/jansi
runtimeOnly("org.fusesource.jansi:jansi:2.4.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.0")
implementation 'org.json:json:20240303'
}
jacoco {
toolVersion = "0.8.14"
}
jacocoTestReport {
dependsOn test
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
checkstyle {
toolVersion = '10.21.0'
configFile = file('config/checkstyle/checkstyle.xml')
configProperties = [
'suppressionFile': file('config/checkstyle/suppressions.xml').absolutePath
]
}
spotless {
java {
googleJavaFormat('1.35.0').aosp()
importOrder()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}
tasks.named('jar', Jar) {
@@ -42,6 +80,22 @@ tasks.named('jar', Jar) {
}
// Dieses JVM-Argument erlaubt JavaFX und anderen Libraries den Zugriff auf native Methoden.
// Ohne diese Einstellung erscheinen Warnungen und zukünftige Java-Versionen könnten den Zugriff blockieren.
// Siehe: https://openjdk.org/jeps/472
tasks.withType(JavaExec) {
jvmArgs += '--enable-native-access=ALL-UNNAMED'
}
tasks.register('cruntest', JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = 'ch.unibas.dmi.dbis.cs108.casono.Main'
jvmArgs '--enable-native-access=ALL-UNNAMED'
args 'client', '0.0.0.0:1234'
}
tasks.register('fatJar', Jar) {
group = 'build'
description = 'Assembles a runnable fat JAR including runtime dependencies.'
@@ -64,3 +118,17 @@ tasks.register('fatJar', Jar) {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
})
}
tasks.register('javadocJar', Jar) {
group = 'build'
description = 'Assembles a Javadoc JAR.'
dependsOn tasks.named('javadoc')
archiveClassifier = 'javadoc'
from(tasks.javadoc.destinationDir)
}
tasks.register('build-cs108') {
group = 'build'
description = 'Produces executable JAR and Javadoc JAR for CS108.'
dependsOn tasks.named('fatJar'), tasks.named('javadocJar')
}
+170
View File
@@ -0,0 +1,170 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Fail build if checkstyle finds violations -->
<!-- https://checkstyle.sourceforge.io/config.html#Properties_1 -->
<property name="severity" value="error"/>
<!-- Only check java files -->
<!-- https://checkstyle.sourceforge.io/config.html#Properties_1 -->
<property name="fileExtensions" value="java"/>
<module name="SuppressionFilter">
<property name="file" value="${suppressionFile}"/>
</module>
<!-- Only allow spaces -->
<!-- https://checkstyle.sourceforge.io/checks/whitespace/filetabcharacter.html -->
<module name="FileTabCharacter"/>
<!-- Maximale Zeilenlänge (AOSP enforces 100 lines, the Google Java Style Guide 80)-->
<!-- https://checkstyle.sourceforge.io/checks/sizes/linelength.html -->
<module name="LineLength">
<property name="max" value="100"/>
</module>
<module name="TreeWalker">
<!-- Allows for emptylines BETWEEN methods and classes but DISALLOWS newlines after an opening bracket -->
<!-- https://checkstyle.sourceforge.io/checks/whitespace/emptylineseparator.html -->
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="tokens" value="
METHOD_DEF,
CTOR_DEF,
STATIC_INIT,
INSTANCE_INIT,
CLASS_DEF,
INTERFACE_DEF,
ENUM_DEF
"/>
</module>
<!-- No wildcard imports (import x.*) -->
<!-- https://checkstyle.sourceforge.io/checks/imports/avoidstarimport.html -->
<module name="AvoidStarImport"/>
<!-- No unused imports -->
<!-- https://checkstyle.sourceforge.io/checks/imports/unusedimports.html -->
<module name="UnusedImports"/>
<!-- No unordered / ungrouped imports -->
<!-- https://checkstyle.sourceforge.io/checks/imports/importorder.html -->
<module name="ImportOrder">
<property name="option" value="top"/>
<property name="groups" value="/^import static\..+/,*"/>
<property name="separated" value="true"/>
<property name="separatedStaticGroups" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<!-- Classes, enums, records, ... as PascalCase -->
<!-- https://checkstyle.sourceforge.io/checks/naming/typename.html -->
<module name="TypeName"/>
<!-- Method names as camelCase -->
<!-- https://checkstyle.sourceforge.io/checks/naming/methodname.html -->
<module name="MethodName"/>
<!-- Parameter names as camelCase -->
<!-- https://checkstyle.sourceforge.io/checks/naming/parametername.html -->
<module name="ParameterName"/>
<!-- Lokal variables as camelCase -->
<!-- https://checkstyle.sourceforge.io/checks/naming/localvariablename.html -->
<module name="LocalVariableName"/>
<!-- Constants as UPPER_SNAKE_CASE -->
<!-- https://checkstyle.sourceforge.io/checks/naming/constantname.html -->
<module name="ConstantName"/>
<!-- Field names as camelCase -->
<!-- https://checkstyle.sourceforge.io/checks/naming/membername.html -->
<module name="MemberName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>
<!-- Restrict length of method name -->
<!-- https://checkstyle.sourceforge.io/checks/sizes/methodlength.html -->
<module name="MethodLength">
<property name="max" value="60"/>
<property name="countEmpty" value="false"/>
</module>
<!-- Restrict number of parameters -->
<!-- https://checkstyle.sourceforge.io/checks/sizes/parameternumber.html -->
<module name="ParameterNumber">
<property name="max" value="5"/>
</module>
<!-- Modifier-Reihenfolge: public static final ... -->
<!-- https://checkstyle.sourceforge.io/checks/modifier/modifierorder.html -->
<module name="ModifierOrder"/>
<!-- Require braces arround code block (no single instruction after if/else/while/...)-->
<!-- https://checkstyle.sourceforge.io/checks/blocks/needbraces.html -->
<module name="NeedBraces"/>
<!-- Require the left curly braces at the same line -->
<!-- https://checkstyle.sourceforge.io/checks/blocks/leftcurly.html -->
<module name="LeftCurly"/>
<!-- Require right curly braces at the same line as following instructions -->
<!-- https://checkstyle.sourceforge.io/checks/blocks/rightcurly.html -->
<module name="RightCurly"/>
<!-- Disallow empty code blocks -->
<!-- https://checkstyle.sourceforge.io/checks/blocks/emptyblock.html -->
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<!-- Disallow empty code blocks after catch -->
<!-- https://checkstyle.sourceforge.io/checks/blocks/emptycatchblock.html -->
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected|ignored"/>
</module>
<!-- Require string literals to be compared with .equals and not == -->
<!-- https://checkstyle.sourceforge.io/checks/coding/stringliteralequality.html -->
<module name="StringLiteralEquality"/>
<!-- Disallow standalone numbers in code -->
<!-- https://checkstyle.sourceforge.io/checks/coding/magicnumber.html -->
<module name="MagicNumber">
<property name="ignoreNumbers" value="-1, 0, 1, 2"/>
<property name="ignoreAnnotation" value="true"/>
</module>
<!-- Disallow nested code blocks dangling in code -->
<!-- https://checkstyle.sourceforge.io/checks/blocks/avoidnestedblocks.html -->
<module name="AvoidNestedBlocks"/>
<!-- Disallow System.out.println -->
<!-- https://checkstyle.sourceforge.io/checks/regexp/regexp.html -->
<module name="Regexp">
<property name="id" value="SystemOutErr"/>
<property name="format" value="System\.(out|err)\.print"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="No `System.out.print(err)` allowed — use a logger."/>
</module>
<!-- Disallow whitespace before semicolon or bracket -->
<!-- https://checkstyle.sourceforge.io/checks/whitespace/nowhitespacebefore.html -->
<module name="NoWhitespaceBefore"/>
<!-- Disallow whitespace after code -->
<!-- https://checkstyle.sourceforge.io/checks/whitespace/whitespaceafter.html -->
<module name="WhitespaceAfter"/>
<!-- No trailing whitespace at line ending -->
<!-- https://checkstyle.sourceforge.io/checks/regexp/regexp.html -->
<module name="Regexp">
<property name="format" value=" +$"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="No trailing whitespace."/>
</module>
</module>
</module>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<!-- Allow literal, for example assertEquals(42, life.answer()) -->
<suppress checks="MagicNumber" files=".*Test\.java"/>
<!-- Allow longer method names as the are usually descriptive of the test -->
<suppress checks="MethodLength" files=".*Test\.java"/>
<!-- Allow methods with more parameters -->
<suppress checks="ParameterNumber" files=".*Test\.java"/>
<!-- Allow for System.out.println in tests -->
<suppress id="SystemOutErr" files=".*Test\.java"/>
<!-- Allow wildcard imports (import x.*) -->
<suppress checks="AvoidStarImport" files=".*Test\.java"/>
<!-- Allow for compacter line seperators -->
<suppress checks="EmptyLineSeparator" files=".*Test\.java"/>
<!-- Allow longer method length in composition root -->
<suppress checks="MethodLength" files="ServerApp.java"/>
</suppressions>
+9
View File
@@ -0,0 +1,9 @@
# Besprechung über Veränderung der Aufgabenteilung
## Verschieben von Aufgaben
Da die Implementation der client server Kommunikation länger dauerte als geplant, wurden achivements erfüllt, die erst bei späteren Meilensteinen relevant sein werden.
## Aufgabeverteilung
Um zu vermeiden, dass sich Personen erst lange Zeit in den Code anderer einarbeiten müssen um zu helfen, wurden Dokumentation und das Erstellen von Materialien für MS4 auf ein Teammitgleid (Jona) ausgelagert um das Projekt nicht zu verlangsamen
+38
View File
@@ -0,0 +1,38 @@
# Neue Aufgabenteilung für MS4 (10.04)
## Kurzfassung
Offene Meilensteine wurden überprüft und Personen zugewiesen. Ziel ist, verbleibende Funktionen (Game List, Username-Integration, Lobby/Chat-Funktionen) bis zum nächsten Sprint stabil zu machen.
## Offene Aufgaben
- Broadcast: Offen (Priorität niedrig)
- Username-Integration: In Backend integrieren und frontend Anpasungen (wichtig)
- Demo: Kernfunktion vorhanden, muss getestet werden
- Game List: Backend fehlt vollständig
- Chat: Globaler Chat und Lobby-Chat müssen eingebunden werden
- Lounging: Support für mehrere Lobbys und Spielerlisten
- QA: Präsentation und Dokumentation
- Rules to Code: Vorstellung und Integration
- "Shall we play a game": Flag zum Umschalten zwischen Demo- und Normalmodus
- Whisper: Funktion (siehe Zuordnung)
- Zeitplan: Verschiebung von nicht-kritischen Punkten
## Aufgaben & Zustänextrdigkeiten
- Jona
- Command Line: Parsing, Option für Username-Eingabe (Start vs. Lobby)
- Game List: Implementierung (Datenstruktur, Commands, Backend-Anbindung)
- Lounging: Mehrere Lobbys, Liste aller Spieler
- Lars
- QA: Präsentation und ausgeschriebenes Dokument
- Mathis
- Whisper-Chat: Fertigstellung
- Lobby-Chat: Integration
- Julian
- Game Engine: Fertigstellung
- Flag: Umschalten zwischen Demo- und echter Game Engine
- Rules to Code: Vorstellung
+5
View File
@@ -0,0 +1,5 @@
## Besprechung vom 13.05.2026
### Abstimmung über die Implementierung der Auto-Discovery im lokalen Netzwerk
Über einen vom Server ausgesendeten Multicast gäbe es die Möglichkeit das Clients in ihrem lokalen Netzwerk aktive Server automatisch finden.
Da Julian für Prüfungen lernen muss, haben wir diese Funktion leider nicht weiter verfolgt.
+13
View File
@@ -0,0 +1,13 @@
# MS2 Meeting
> 14.03.2025 (14:00)
In einem Meeting haben wir die Struktur zwischen **LobbyScreen**, **GameScreen**
und der **Chatbox** besprochen. Dabei ging es vor allem darum, wie der Chat in beide
UIs eingebettet wird und wie die Verbindung zwischen den Komponenten umgesetzt wird.
Außerdem wurde festgelegt, dass der **Endscreen** erst nach MS3 umgesetzt wird.
Zunächst werden die Texturen fertiggestellt und im GameScreen integriert.
Falls sich die Struktur (z. B. FXML oder CSS) noch ändert, kann der Endscreen
später aus der bestehenden Struktur abgeleitet werden, ohne Anpassungen doppelt
durchführen zu müssen.
+11
View File
@@ -0,0 +1,11 @@
# Besprechung vom 26.04.2024
## Fortschritt für die Implementierung der Unit Tests
Die Unit Tests für alle zentralen Komponenten des Netzwerkes wurden erfolgreich implementiert.
Bei dieser Gelegenheit wurden auch Bugs behoben und die Codequalität verbessert.
In einzelnen Bereichen wurde noch nicht die vorgenommene Quote von 50% erreicht, weitere Unit-Tests sollen bis zum nächsten Meilenstein folgen. Komponenten beteiligt an den Kernbereichen sind größtenteils abgedeckt.
## Perspektivische Änderungen für den letzten Meilenstein
Ein getroffener Kompromiss um den vierten Meilenstein fristgerecht zu erreichen, war das zurückstellen der Codequalität.
In der Zeit bis zum sechsten Meilenstein sollen diese Provisorien noch einmal überarbeitet und finalisiert werden.
+46
View File
@@ -0,0 +1,46 @@
# Meeting Diary
This folder holds the notes and documentation of all team meetings throughout the project.
The notes are organized by **milestones (16)** so that everyone can easily see what was discussed and decided at each stage. Each sub-header below links to the actual Markdown file containing the details.
## Milestone 1
### [24. February 2026](24-02.md)
- Project idea
- Assignment of roles
- First draft of network protocol
### [27. February 2026](27-02.md)
- UI mockup
- Finalizing structure of network protocol
## Milestone 2
### [14. March 2025](14-03.md)
- Discussion of LobbyScreen, GameScreen, and Chatbox structure
- Endscreen postponed to MS3
## Milestone 3
None, as milestone 3 covered the assessment of individual technical understanding through evaluation.
## Milestone 4
### [09. April 2026](09-04.md)
- Task redistribution due to delays in client-server communication
- Documentation and MS4 materials assigned to Jona
### [10. April 2026](10-04.md)
- Review and assignment of open milestones
- Focus on stabilizing Game List, Username-Integration, Lobby/Chat functions
- Task list for remaining features and QA
## Milestone 5
### [26. April 2026](26-04.md)
- Progress on unit tests and code quality improvements
- Discussion of compromises made for MS4 and plans for finalizing code quality by MS6
## Milestone 6
### [13. Mai 2026](13-05.md)
- Discussion on possible auto-discovery feature; not implementing due to time constrains
-34
View File
@@ -1,34 +0,0 @@
# Meeting Diary
This folder holds the notes and documentation of all team meetings throughout the project.
The notes are organised by **milestones (16)** so that everyone can easily see what was discussed and decided at each stage. Each sub-header below links to the actual Markdown file containing the details.
## Milestone 1
### [24. February 2026](24-02.md)
- Project idea
- Assignment of roles
- First draft of network protocol
### [27. February 2026](27-02.md)
- UI mockup
- Finalizing structure of network protocol
## Milestone 2
*(Meeting notes to be added here when available)*
## Milestone 3
*(Meeting notes to be added here when available)*
## Milestone 4
*(Meeting notes to be added here when available)*
## Milestone 5
*(Meeting notes to be added here when available)*
## Milestone 6
*(Meeting notes to be added here when available)*
+7
View File
@@ -0,0 +1,7 @@
# Casono Game Engine
- [Casono TDA Rules, Version 1.0 (2024)](casono-tda-rules-version-1-2024.md)
- [Game Engine Architecture](game-engine-architecture.md)
- [Casono Rules Easy Description](casono-rules-easy-description.md)
- [Game engine implementation](game-engine-implementation.md)
- [Casonso Manual](casono-manual.md)
+430
View File
@@ -0,0 +1,430 @@
# Casono Manual
<!-- vim-markdown-toc GFM -->
* [Start Game](#start-game)
* [Server starten](#server-starten)
* [Client starten](#client-starten)
* [UI](#ui)
* [Lobby UI](#lobby-ui)
* [Eine Lobby erstellen](#eine-lobby-erstellen)
* [Einer Lobby beitreten](#einer-lobby-beitreten)
* [Den Username ändern](#den-username-ändern)
* [Highscores](#highscores)
* [Game UI](#game-ui)
* [Themes](#themes)
* [Casono Browser](#casono-browser)
* [ChatUI](#chat ui)
* [Casono Rules](#casono-rules)
* [1. Spielübersicht](#1-spielübersicht)
* [Grundregeln](#grundregeln)
* [2. Sitzposition & Dealer-Button](#2-sitzposition--dealer-button)
* [3. Blinds (Pflichteinsätze)](#3-blinds-pflichteinsätze)
* [4. Spielablauf im Detail](#4-spielablauf-im-detail)
* [4.1 Preflop (erste Setzrunde)](#41-preflop-erste-setzrunde)
* [4.2 Flop (3 Gemeinschaftskarten)](#42-flop-3-gemeinschaftskarten)
* [4.3 Turn (4. Gemeinschaftskarte)](#43-turn-4-gemeinschaftskarte)
* [4.4 River (5. Gemeinschaftskarte)](#44-river-5-gemeinschaftskarte)
* [5. Showdown (Kartenvergleich)](#5-showdown-kartenvergleich)
* [6. Poker-Handrangfolge](#6-poker-handrangfolge)
* [7. Wichtige Grundprinzipien](#7-wichtige-grundprinzipien)
* [Reihenfolge beachten](#reihenfolge-beachten)
* [Klare Aktionen](#klare-aktionen)
* [Ein Spieler eine Hand](#ein-spieler--eine-hand)
* [Fehlerhafte Einsätze](#fehlerhafte-einsätze)
* [8. Strategische Einordnung](#8-strategische-einordnung)
* [Casono Rules Easy Description](#casono-rules-easy-description)
* [Blinds (Small Blind & Big Blind)](#blinds-small-blind--big-blind)
* [Erste Setzrunde (Preflop)](#erste-setzrunde-preflop)
* [Beispiel Preflop](#beispiel-preflop)
* [Flop (3 Gemeinschaftskarten)](#flop-3-gemeinschaftskarten)
* [Beispiel Flop](#beispiel-flop)
* [Turn (4. Karte)](#turn-4-karte)
* [River (5. Karte)](#river-5-karte)
* [Showdown (Gewinnentscheidung)](#showdown-gewinnentscheidung)
* [Poker Hand Rankings (Gewichtung)](#poker-hand-rankings-gewichtung)
* [Fazit](#fazit)
<!-- vim-markdown-toc -->
# Start Game
Es wird Java 25 benötigt
## Server starten
```bash
java -jar casono.jar server <listenport>
```
## Client starten
```bash
java -jar casono.jar client <serverip>:<serverport> [username]
```
Die Parameter serverip, serverport, listenport und username müssen ersetzt werden
# UI
## Lobby UI
### Eine Lobby erstellen
![Create a Lobby](./images/create-a-lobby.png)
### Einer Lobby beitreten
![Join a Lobby](./images/join-a-lobby.png)
### Den Username ändern
![Change Username](./images/change-username.png)
### Highscores
![View Highscores](./images/view-high-scores.png)
## Game UI
![Game UI](./images/game-ui.png)
![Taskbar](./images/taskbar.png)
## Themes
![Set the theme](./images/game_ui_normal_theme.png)
### Black-and-White Theme
![Black and White Theme](./images/game_ui_black_white_theme.png)
### Glass-Effect Theme
![Glass Effect Theme](./images/game_ui_glass_theme.png)
## Casono Browser
![[casono-browser.png]]
![Casono Browser](./images/casono-browser.png)
## Chat UI
### Globaler Chat
![Globaler Chat](./images/global_chat.png)
### Lobby Chat
![Lobby Chat](./images/lobby_chat.png)
### Whisper Chat
![Whisper Chat](./images/whisper_chat.png)
# Casono Rules
## 1. Spielübersicht
Texas Holdem ist ein strategisches Kartenspiel für mehrere Spieler.
Ziel ist es, den Pot (alle gesetzten Chips) zu gewinnen, entweder durch:
- die beste Kartenkombination am Ende der Runde
- oder indem alle anderen Spieler vorher aussteigen (Fold)
### Grundregeln
- Jeder Spieler erhält 2 verdeckte Karten (Hole Cards)
- Es werden 5 Gemeinschaftskarten offen in der Mitte ausgelegt
- Jeder Spieler bildet die beste 5-Karten-Kombination aus:
- eigenen Karten
- und Gemeinschaftskarten
- Zu Spielbeginn erhält jeder Spieler ein Startgeld von 20000 Chips ($)
## 2. Sitzposition & Dealer-Button
Der sogenannte Dealer-Button bestimmt die Positionen am Tisch:
- Er zeigt an, wer als „Geber“ (Dealer) fungiert
- Die Positionen rotieren im Uhrzeigersinn nach jeder Runde
Die Position ist entscheidend, da sie bestimmt:
- die Reihenfolge der Aktionen
- wer die Blinds setzen muss
## 3. Blinds (Pflichteinsätze)
Vor jeder Runde werden zwei verpflichtende Einsätze geleistet:
- **Small Blind** (kleiner Blind): 100 Chips gesetzt vom Spieler links neben dem Dealer
- **Big Blind** (großer Blind): 200 Chips - gesetzt vom Spieler zwei Plätze links vom Dealer
Diese Einsätze sorgen dafür, dass:
- ein Startpot entsteht
- jede Runde aktiv gespielt wird
## 4. Spielablauf im Detail
### 4.1 Preflop (erste Setzrunde)
Nach dem Austeilen der Karten beginnt die erste Setzrunde.
Der Spieler links vom Big Blind eröffnet die Runde.
Jeder Spieler hat folgende Optionen:
- **Fold** Karten ablegen und aussteigen
- **Call** Einsatz mitgehen
- **Raise** Einsatz erhöhen
### 4.2 Flop (3 Gemeinschaftskarten)
- Drei Karten werden offen auf den Tisch gelegt
- Eine neue Setzrunde beginnt
- Die Setzrunde beginnt jetzt immer beim ersten aktiven Spieler links vom Dealer (im Uhrzeigersinn).
- Der erste Spieler bei der Flop Runde muss keinen höheren Einsatz setzen als der letzte Spieler aus der Preflop Runde, allerdings muss er seinen eigenen Einsatz aus der Preflop Runde überbieten.
Ab diesem Zeitpunkt können alle Spieler ihre Strategie anhand zusätzlicher Informationen anpassen.
### 4.3 Turn (4. Gemeinschaftskarte)
- Die vierte Karte wird aufgedeckt
- Eine weitere Setzrunde folgt
Die Einsätze werden oft höher, da sich stärkere Hände entwickeln.
### 4.4 River (5. Gemeinschaftskarte)
- Die letzte Karte wird aufgedeckt
- Letzte Setzrunde
Dies ist die finale Entscheidungsphase:
- Maximierung des Gewinns
- oder Minimierung von Verlusten
## 5. Showdown (Kartenvergleich)
Wenn nach der letzten Setzrunde mindestens zwei Spieler verbleiben:
- Alle verbleibenden Spieler decken ihre Karten auf
- Die **beste 5-Karten-Kombination gewinnt**
Wichtig:
- Die Karten „sprechen für sich“ die beste Hand zählt unabhängig von Ansagen
## 6. Poker-Handrangfolge
Die Stärke der Hände ist eindeutig festgelegt (von schwach nach stark):
1. High Card (höchste Einzelkarte)
2. One Pair (ein Paar)
3. Two Pair (zwei Paare)
4. Three of a Kind (Drilling)
5. Straight (Straße)
6. Flush (Farbe)
7. Full House
8. Four of a Kind (Vierling)
9. Straight Flush
10. Royal Flush
Je höher die Kombination, desto stärker die Hand.
## 7. Wichtige Grundprinzipien
### Reihenfolge beachten
Spieler müssen immer der Reihe nach handeln.
### Klare Aktionen
Alle Aktionen müssen eindeutig sein:
- Einsätze klar ansagen oder eindeutig setzen
### Ein Spieler eine Hand
- Spieler dürfen ihre Karten nicht teilen oder gemeinsam spielen
### Fehlerhafte Einsätze
- Unklare oder falsche Einsätze können korrigiert werden, abhängig von der Spielsituation (nur wenn der Einsatz
außerhalb der gültigen Grenzen liegt; zu hohe oder unzulässige Beträge werden blockiert und nicht automatisch
korrigiert)
## 8. Strategische Einordnung
Texas Holdem ist kein reines Glücksspiel. Der Erfolg basiert auf:
- Wahrscheinlichkeiten (Mathematik)
- Einschätzung von Gegnern (Psychologie)
- Positionsspiel und Timing
# Casono Rules Easy Description
Der Pokertisch ist ein unglaublich faszinierender Erlebnisraum, in dem man sehr viel lernen kann: über sich selbst, über
andere Menschen und über Fragen wie: Wie treffe ich eigentlich Entscheidungen, wie gehe ich mit Stress und Unsicherheit
um und wie gut ich darin bin, mich in andere hineinzuversetzen und Situationen richtig einzuschätzen.
Damit Du in diesem Erlebnisraum starten kannst, ist es wie bei jedem Spiel notwendig, zuerst die Grundregeln und den
Spielablauf zu verstehen.
Also los geht es:
Wir haben am Tisch **4 Spieler**: Julian, Mathis, Jona und Lars. Jeder Spieler startet mit **20000 Chips ($)**. Jeder
bekommt **2 Karten auf die Hand** und es gibt zusätzlich **5 Gemeinschaftskarten**, die später in der Mitte aufgedeckt
werden.
![1. image](./images/1-1.svg)
Die Spieler sitzen in folgender Reihenfolge: Julian, Mathis, Jona und Lars. Einer davon hat den Dealer-Button, der
bestimmt, wer die Karten austeilt und von wo die Runde beginnt. Dieser Button wandert nach jeder Runde im Uhrzeigersinn
weiter und verändert damit die Position ständig.
Regel: *34 Button Placement and Movement 🟢*
## Blinds (Small Blind & Big Blind)
Bevor die Karten verteilt werden, gibt es zwei Pflicht-Einsätze:
Der Small Blind und der Big Blind. Der Big Blind ist immer doppelt so hoch wie der Small Blind.
![2. image](./images/2-1.svg)
Regel: *32 Dead Button 🟡*
Diese Einsätze sorgen dafür, dass sofort ein Pot entsteht und das Spiel überhaupt beginnt, weil jeder schon “im Spiel”
ist.
Danach werden die Karten verteilt: zuerst Small Blind, dann Big Blind und dann im Uhrzeigersinn alle anderen Spieler.
## Erste Setzrunde (Preflop)
Die erste Setzrunde beginnt immer bei dem Spieler links vom Big Blind.
Jetzt muss jeder Spieler entscheiden:
* Fold (aussteigen)
* Call (mitgehen)
* Raise (erhöhen)
Regel: *40 Methods of Betting 🟢*
Regel: *41 Methods of Calling 🟢*
Regel: *42 Methods of Raising 🟢*
Regel: *50 Acting in Turn 🟢*
## Beispiel Preflop
Julian schaut seine Karten an und entscheidet sich direkt für einen Raise von **600 Chips**.
![3. image](./images/3-1.svg)
Mathis sieht seine Karten an und merkt, dass sie nicht gut sind, also foldet er und steigt aus.
![4. image](./images/4-1.svg)
Jona ist nun dran und entscheidet sich ebenfalls für einen Call, weil seine Hand spielbar ist.
![5. image](./images/5-1.svg)
Lars schaut seine Karten an, erkennt eine starke Hand und erhöht auf **1200 Chips**.
![6. image](./images/6-1.svg)
Damit verändert sich sofort die Situation: Julian und Jona müssen entscheiden, ob sie diesen Raise bezahlen, selbst
erhöhen oder aussteigen.
## Flop (3 Gemeinschaftskarten)
Jetzt werden **3 Gemeinschaftskarten** in die Mitte gelegt. Ab hier verändert sich das Spiel komplett, weil alle Spieler
zusätzliche Informationen bekommen.
Die Setzrunde beginnt jetzt immer beim ersten aktiven Spieler links vom Dealer (im Uhrzeigersinn).
![7. image](./images/7-1.svg)
Es beginnt eine neue Setzrunde.
Regel: *49 Accepted Action 🟢*
## Beispiel Flop
Jona setzt **1000 Chips** als Erstes. Lars entscheidet sich mitzugehen (Call), weil seine Karten durch die
Gemeinschaftskarten stärker geworden sind.
Julian steigt aus, weil er keine gute Verbindung mehr sieht. Mathis ist bereits raus.
![8. image](./images/8-1.svg)
## Turn (4. Karte)
Jetzt kommt die **4. Gemeinschaftskarte**.
Wieder beginnt eine neue Setzrunde.
Jona setzt diesmal **3000 Chips**. Lars bezahlt erneut (Call), weil seine Hand weiterhin gut spielbar ist.
![9. image](./images/9-1.svg)
Regel: *53 Action Out of Turn 🟡*
## River (5. Karte)
Jetzt wird die letzte Gemeinschaftskarte aufgedeckt.
Dies ist die letzte Entscheidung im Spiel.
Jona setzt **5000 Chips**.
![10. image](./images/10-1.svg)
Lars muss jetzt entscheiden: Fold, Call oder Raise auf 10000 Chips.
Regel: *54 Pot Size Bets 🟡*
## Showdown (Gewinnentscheidung)
Wenn nach der letzten Setzrunde noch zwei Spieler übrig sind, kommt es zum Showdown.
Beide Spieler zeigen ihre Karten offen. Gewonnen hat die **beste 5-Karten-Kombination aus Handkarten und
Gemeinschaftskarten**.
![11. image](./images/11-1.svg)
Regel: *12 Cards Speak at Showdown 🟢*
Regel: *16 Face Up for All-Ins 🟢*
Regel: *17 Non All-In Showdowns 🟢*
Wenn Lars den letzten Einsatz bezahlt, werden die Hände verglichen. Wenn er foldet, gewinnt Jona automatisch den
gesamten Pot.
## Poker Hand Rankings (Gewichtung)
Die Kartenkombinationen sind klar geordnet von schwach bis extrem stark:
<img src="./images/12.png" height="600">
Je höher die Kombination, desto stärker die Hand und desto wahrscheinlicher der Gewinn.
Jona: 2. Paar:
![13. image](./images/13-1.svg)
Lars: 1. Paar:
![14. image](./images/14-1.svg)
Da zwei Paare in der Rangfolge über einem einzelnen Paar stehen, gewinnt Jona diese Runde.
## Fazit
Poker ist kein Glücksspiel im klassischen Sinn, sondern ein Spiel aus Strategie, Psychologie und Mathematik. Jede
Entscheidung von Julian, Mathis, Jona oder Lars verändert die komplette Dynamik am Tisch. Wer die Regeln versteht,
versteht nicht nur Karten, sondern auch Menschen und Entscheidungen unter Druck.
Regel: *67 One Player One Hand 🟢*
Regel: *52 Incorrect Bets 🟡*
Regel: *57 Non-Standard Betting 🟡*
@@ -0,0 +1,85 @@
const marked = {
parse: function (md) {
if (!md) return "";
let toc = [];
md = md.replace(/^(#{1,3})\s+(.*)$/gim, (m, hashes, title) => {
const level = hashes.length;
const id = title
.toLowerCase()
.trim()
.replace(/[^\wäöüß]+/g, "-")
.replace(/-+/g, "-")
.replace(/^-|-$/g, "");
toc.push({ level, title, id });
return `
<h${level} id="${id}" class="cm-h${level}">
${title}
</h${level}>
`;
});
md = md.replace(/```(\w*)\n?([\s\S]*?)```/g, (_, lang, code) => {
const langClass = lang ? ` language-${lang}` : "";
return `<pre class="cm-code${langClass}"><code>${escapeHtml(code.trim())}</code></pre>`;
});
md = md.replace(/!\[(.*?)\]\((.*?)\)/gim,
`<img alt="$1" src="$2" class="cm-img">`
);
md = md.replace(/\[(.*?)\]\((.*?)\)/gim,
`<a href="$2" target="_blank" class="cm-link">$1</a>`
);
md = md.replace(/`(.*?)`/gim,
`<code class="cm-inline">$1</code>`
);
md = md.replace(/\*\*(.*?)\*\*/gim, "<b>$1</b>");
md = md.replace(/\*(.*?)\*/gim, "<i>$1</i>");
md = md.replace(/^\s*-\s(.+)$/gim, "<li>$1</li>");
md = wrapLists(md);
md = md
.replace(/\n{2,}/g, "</p><p>")
.replace(/^(?!<h|<ul|<pre|<li|<\/)(.+)$/gim, "<p>$1</p>");
return buildToc(toc) + md;
}
};
function buildToc(items) {
if (!items.length) return "";
let html = `<div class="cm-toc">`;
items.forEach(i => {
html += `
<div class="cm-toc-item level-${i.level}">
<a href="#${i.id}">${i.title}</a>
</div>
`;
});
html += `</div>`;
return html;
}
function wrapLists(html) {
return html.replace(/(<li>.*?<\/li>)/gs, "<ul>$1</ul>");
}
function escapeHtml(text) {
return text
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
}
window.marked = marked;
@@ -0,0 +1,166 @@
# Casono Rules Easy Description
> Quelle: https://www.youtube.com/watch?v=h-1WyU5Wqsw&pp=ygUZbGVybmVuIHBva2VyIHRleGFzIGhvbGRlbQ%3D%3D
<!-- vim-markdown-toc GFM -->
* [Blinds (Small Blind & Big Blind)](#blinds-small-blind--big-blind)
* [Erste Setzrunde (Preflop)](#erste-setzrunde-preflop)
* [Beispiel Preflop](#beispiel-preflop)
* [Flop (3 Gemeinschaftskarten)](#flop-3-gemeinschaftskarten)
* [Beispiel Flop](#beispiel-flop)
* [Turn (4. Karte)](#turn-4-karte)
* [River (5. Karte)](#river-5-karte)
* [Showdown (Gewinnentscheidung)](#showdown-gewinnentscheidung)
* [Poker Hand Rankings (Gewichtung)](#poker-hand-rankings-gewichtung)
* [Fazit](#fazit)
<!-- vim-markdown-toc -->
Der Pokertisch ist ein unglaublich faszinierender Erlebnisraum, in dem man sehr viel lernen kann: über sich selbst, über andere Menschen und über Fragen wie: Wie treffe ich eigentlich Entscheidungen, wie gehe ich mit Stress und Unsicherheit um und wie gut ich darin bin, mich in andere hineinzuversetzen und Situationen richtig einzuschätzen.
Damit Du in diesem Erlebnisraum starten kannst, ist es wie bei jedem Spiel notwendig, zuerst die Grundregeln und den Spielablauf zu verstehen.
Also los geht es:
Wir haben am Tisch **4 Spieler**: Julian, Mathis, Jona und Lars. Jeder Spieler startet mit **20000 Chips ($)**. Jeder bekommt **2 Karten auf die Hand** und es gibt zusätzlich **5 Gemeinschaftskarten**, die später in der Mitte aufgedeckt werden.
![1. image](./images/1-1.svg)
Die Spieler sitzen in folgender Reihenfolge: Julian, Mathis, Jona und Lars. Einer davon hat den Dealer-Button, der bestimmt, wer die Karten austeilt und von wo die Runde beginnt. Dieser Button wandert nach jeder Runde im Uhrzeigersinn weiter und verändert damit die Position ständig.
Regel: *34 Button Placement and Movement 🟢*
## Blinds (Small Blind & Big Blind)
Bevor die Karten verteilt werden, gibt es zwei Pflicht-Einsätze:
Der Small Blind und der Big Blind. Der Big Blind ist immer doppelt so hoch wie der Small Blind.
![2. image](./images/2-1.svg)
Regel: *32 Dead Button 🟡*
Diese Einsätze sorgen dafür, dass sofort ein Pot entsteht und das Spiel überhaupt beginnt, weil jeder schon “im Spiel” ist.
Danach werden die Karten verteilt: zuerst Small Blind, dann Big Blind und dann im Uhrzeigersinn alle anderen Spieler.
## Erste Setzrunde (Preflop)
Die erste Setzrunde beginnt immer bei dem Spieler links vom Big Blind.
Jetzt muss jeder Spieler entscheiden:
* Fold (aussteigen)
* Call (mitgehen)
* Raise (erhöhen)
Regel: *40 Methods of Betting 🟢*
Regel: *41 Methods of Calling 🟢*
Regel: *42 Methods of Raising 🟢*
Regel: *50 Acting in Turn 🟢*
## Beispiel Preflop
Julian schaut seine Karten an und entscheidet sich direkt für einen Raise von **600 Chips**.
![3. image](./images/3-1.svg)
Mathis sieht seine Karten an und merkt, dass sie nicht gut sind, also foldet er und steigt aus.
![4. image](./images/4-1.svg)
Jona ist nun dran und entscheidet sich ebenfalls für einen Call, weil seine Hand spielbar ist.
![5. image](./images/5-1.svg)
Lars schaut seine Karten an, erkennt eine starke Hand und erhöht auf **1200 Chips**.
![6. image](./images/6-1.svg)
Damit verändert sich sofort die Situation: Julian und Jona müssen entscheiden, ob sie diesen Raise bezahlen, selbst erhöhen oder aussteigen.
## Flop (3 Gemeinschaftskarten)
Jetzt werden **3 Gemeinschaftskarten** in die Mitte gelegt. Ab hier verändert sich das Spiel komplett, weil alle Spieler zusätzliche Informationen bekommen.
Die Setzrunde beginnt jetzt immer beim ersten aktiven Spieler links vom Dealer (im Uhrzeigersinn).
![7. image](./images/7-1.svg)
Es beginnt eine neue Setzrunde.
Regel: *49 Accepted Action 🟢*
## Beispiel Flop
Jona setzt **1000 Chips** als Erstes. Lars entscheidet sich mitzugehen (Call), weil seine Karten durch die Gemeinschaftskarten stärker geworden sind.
Julian steigt aus, weil er keine gute Verbindung mehr sieht. Mathis ist bereits raus.
![8. image](./images/8-1.svg)
## Turn (4. Karte)
Jetzt kommt die **4. Gemeinschaftskarte**.
Wieder beginnt eine neue Setzrunde.
Jona setzt diesmal **3000 Chips**. Lars bezahlt erneut (Call), weil seine Hand weiterhin gut spielbar ist.
![9. image](./images/9-1.png)
Regel: *53 Action Out of Turn 🟡*
## River (5. Karte)
Jetzt wird die letzte Gemeinschaftskarte aufgedeckt.
Dies ist die letzte Entscheidung im Spiel.
Jona setzt **5000 Chips**.
![10. image](./images/10-1.png)
Lars muss jetzt entscheiden: Fold, Call oder Raise auf 10000 Chips.
Regel: *54 Pot Size Bets 🟡*
## Showdown (Gewinnentscheidung)
Wenn nach der letzten Setzrunde noch zwei Spieler übrig sind, kommt es zum Showdown.
Beide Spieler zeigen ihre Karten offen. Gewonnen hat die **beste 5-Karten-Kombination aus Handkarten und Gemeinschaftskarten**.
![11. image](./images/11-1.png)
Regel: *12 Cards Speak at Showdown 🟢*
Regel: *16 Face Up for All-Ins 🟢*
Regel: *17 Non All-In Showdowns 🟢*
Wenn Lars den letzten Einsatz bezahlt, werden die Hände verglichen. Wenn er foldet, gewinnt Jona automatisch den gesamten Pot.
## Poker Hand Rankings (Gewichtung)
Die Kartenkombinationen sind klar geordnet von schwach bis extrem stark:
<img src="./images/12.png" height="600">
Je höher die Kombination, desto stärker die Hand und desto wahrscheinlicher der Gewinn.
Jona: 2. Paar:
![13. image](./images/13-1.png)
Lars: 1. Paar:
![14. image](./images/14-1.png)
Da zwei Paare in der Rangfolge über einem einzelnen Paar stehen, gewinnt Jona diese Runde.
## Fazit
Poker ist kein Glücksspiel im klassischen Sinn, sondern ein Spiel aus Strategie, Psychologie und Mathematik. Jede Entscheidung von Julian, Mathis, Jona oder Lars verändert die komplette Dynamik am Tisch. Wer die Regeln versteht, versteht nicht nur Karten, sondern auch Menschen und Entscheidungen unter Druck.
Regel: *67 One Player One Hand 🟢*
Regel: *52 Incorrect Bets 🟡*
Regel: *57 Non-Standard Betting 🟡*
@@ -0,0 +1,740 @@
# View Casono TDA Rules, Procedures, & Addendum
> The following game rules are based exclusively on the official rule set of the Tournament Directors Association (TDA) Poker TDA Rules, Version 1.0 (2024) which serves as the primary reference framework for professional Texas Holdem tournament standards.
>
> For the game Casono, it is set that all game mechanics, in particular gameplay procedures, betting structures, time handling and core game flow, will be in accordance with the TDA Rules 2024 as closely as possible.
>
> For implementation purposes, all rules are categorized by priority:
> - 🟢 Green rules are mandatory and must be fully implemented as core game logic
> - 🟡 Yellow rules are optional extensions that may be implemented if time and resources allow
> - 🔴 Red rules are considered non-essential for the core gameplay and may be omitted as they primarily relate to tournament administration, floor decisions or procedural etiquette.
>
> Individual house rules, gameplay simplifications or project-specific modifications are only permitted within the boundaries of the above priority system, provided they do not conflict with 🟢 Green rules. In case of ambiguity, the original intent of the TDA Rules shall be used as the guiding reference.
>
> Authoritative source: https://www.pokertda.com/view-poker-tda-rules/
---
> 2024 Rules, Version 1.0. Oct 9, 2024
> Longform Version Includes: Recommended Procedures and Illustration Addendum
> Last updated: 31.03.2026 - 17:00
---
<!-- vim-markdown-toc GFM -->
* [General Concepts](#general-concepts)
* [1: Floor Decisions 🔴](#1-floor-decisions-)
* [2: Player Responsibilities 🔴](#2-player-responsibilities-)
* [3: Official Terminology and Gestures 🔴](#3-official-terminology-and-gestures-)
* [4: Player Identity 🔴](#4-player-identity-)
* [5: Electronic Devices and Communication 🔴](#5-electronic-devices-and-communication-)
* [6: Official Language 🔴](#6-official-language-)
* [Seating, Breaking and Balancing Tables](#seating-breaking-and-balancing-tables)
* [7: Random Correct Seating 🟡](#7-random-correct-seating-)
* [8: Alternates, Late Registration, and Re-Entries 🟡](#8-alternates-late-registration-and-re-entries-)
* [9: Special Needs 🔴](#9-special-needs-)
* [10: New Players and Players from Broken Tables 🔴](#10-new-players-and-players-from-broken-tables-)
* [11: Balancing Tables and Halting Play 🟡](#11-balancing-tables-and-halting-play-)
* [Pots / Showdown](#pots--showdown)
* [12: Declarations. Cards Speak at Showdown 🟢](#12-declarations-cards-speak-at-showdown-)
* [13: Tabling Cards and Killing Winning Hand 🔴](#13-tabling-cards-and-killing-winning-hand-)
* [14: Live Cards at Showdown 🔴](#14-live-cards-at-showdown-)
* [15: Showdown and Discarding Irregularities 🔴](#15-showdown-and-discarding-irregularities-)
* [16: Face Up for All-Ins 🟢](#16-face-up-for-all-ins-)
* [17: Non All-In Showdowns and Showdown Order 🟢](#17-non-all-in-showdowns-and-showdown-order-)
* [18: Asking to See a Hand 🔴](#18-asking-to-see-a-hand-)
* [19: Playing the Board at Showdown 🔴](#19-playing-the-board-at-showdown-)
* [20: Awarding Odd Chips 🔴](#20-awarding-odd-chips-)
* [21: Side Pots 🟡](#21-side-pots-)
* [22: Disputed Hands and Pots 🔴](#22-disputed-hands-and-pots-)
* [General Procedures](#general-procedures)
* [23: New Hand and New Limits 🟢](#23-new-hand-and-new-limits-)
* [24: Chip Race, Scheduled Color Ups 🟡](#24-chip-race-scheduled-color-ups-)
* [25: Cards and Chips Kept Visible, Countable, and Manageable. Discretionary Color-Ups 🔴](#25-cards-and-chips-kept-visible-countable-and-manageable-discretionary-color-ups-)
* [26: Deck Changes 🔴](#26-deck-changes-)
* [27: Re-buys 🔴](#27-re-buys-)
* [28: Rabbit Hunting 🔴](#28-rabbit-hunting-)
* [29: Calling for a Clock 🟡](#29-calling-for-a-clock-)
* [Player Present / Eligible for Hand](#player-present--eligible-for-hand)
* [30: At Your Seat and Live Hands 🟢](#30-at-your-seat-and-live-hands-)
* [31: At the Table with Action Pending 🔴](#31-at-the-table-with-action-pending-)
* [Button / Blinds](#button--blinds)
* [32: Dead Button 🟡](#32-dead-button-)
* [33: Dodging Blinds 🔴](#33-dodging-blinds-)
* [34: Button Placement and Movement 🟢](#34-button-placement-and-movement-)
* [Dealing Rules](#dealing-rules)
* [35: Misdeals and Fouled Decks 🔴](#35-misdeals-and-fouled-decks-)
* [36: Substantial Action (SA) 🟡](#36-substantial-action-sa-)
* [37: Button with Too Few Cards 🔴](#37-button-with-too-few-cards-)
* [38: Burns After Substantial Action 🔴](#38-burns-after-substantial-action-)
* [39: Irregular Flops and Premature-Dealt Cards 🔴](#39-irregular-flops-and-premature-dealt-cards-)
* [Play: Bets and Raises](#play-bets-and-raises)
* [40: Methods of Betting: Verbal and Chips 🟢](#40-methods-of-betting-verbal-and-chips-)
* [41: Methods of Calling 🟢](#41-methods-of-calling-)
* [42: Methods of Raising 🟢](#42-methods-of-raising-)
* [43: Raise Amounts 🟢](#43-raise-amounts-)
* [44: Oversized Chip Betting (Overchips) 🔴](#44-oversized-chip-betting-overchips-)
* [45: Multiple Chip Betting 🔴](#45-multiple-chip-betting-)
* [46: Prior Bet Chips Not Pulled In 🔴](#46-prior-bet-chips-not-pulled-in-)
* [47: Re-Opening the Bet. 🟡](#47-re-opening-the-bet-)
* [48: Number of Allowable Raises 🟡](#48-number-of-allowable-raises-)
* [49: Accepted Action 🟢](#49-accepted-action-)
* [50: Acting in Turn 🟢](#50-acting-in-turn-)
* [51: Binding Declarations / Undercalls in Turn 🟡](#51-binding-declarations--undercalls-in-turn-)
* [52: Incorrect Bets, Underbets and Underraises 🟡](#52-incorrect-bets-underbets-and-underraises-)
* [53: Action Out of Turn (OOT) 🟡](#53-action-out-of-turn-oot-)
* [54: Pot Size and Pot-Limit Bets 🟡](#54-pot-size-and-pot-limit-bets-)
* [55: Invalid Bet Declarations 🔴](#55-invalid-bet-declarations-)
* [56: String Bets and Raises 🟡](#56-string-bets-and-raises-)
* [57: Non-Standard and Unclear Betting 🟡](#57-non-standard-and-unclear-betting-)
* [58: Non-Standard Folds 🔴](#58-non-standard-folds-)
* [59: Conditional and Premature Declarations 🟡](#59-conditional-and-premature-declarations-)
* [60: Count of Opponents Chip Stack 🟡](#60-count-of-opponents-chip-stack-)
* [61: Over-Betting Expecting Change 🔴](#61-over-betting-expecting-change-)
* [62: All-In with Chips Found Behind Later 🟡](#62-all-in-with-chips-found-behind-later-)
* [Play: Other](#play-other)
* [63: Chips Out of View and in Transit 🔴](#63-chips-out-of-view-and-in-transit-)
* [64: Lost and Found Chips 🔴](#64-lost-and-found-chips-)
* [65: Accidentally Killed / Fouled / Exposed Hands 🟢](#65-accidentally-killed--fouled--exposed-hands-)
* [66: Dead Hands and Mucking in Stud 🔴](#66-dead-hands-and-mucking-in-stud-)
* [Etiquette and Penalties](#etiquette-and-penalties)
* [67: No Disclosure. One Player to a Hand 🟢](#67-no-disclosure-one-player-to-a-hand-)
* [68: Exposing Cards and Proper Folding 🔴](#68-exposing-cards-and-proper-folding-)
* [69: Ethical Play 🔴](#69-ethical-play-)
* [70: Etiquette Violations 🔴](#70-etiquette-violations-)
* [71: Warnings, Penalties, and Disqualification 🔴](#71-warnings-penalties-and-disqualification-)
* [2024 Recommended Procedures](#2024-recommended-procedures)
* [RP-1. All-In Buttons 🔴](#rp-1-all-in-buttons-)
* [RP-2. Bringing in Bets is Discouraged 🔴](#rp-2-bringing-in-bets-is-discouraged-)
* [RP-3. Personal Belongings 🔴](#rp-3-personal-belongings-)
* [RP-4. Disordered Stub 🔴](#rp-4-disordered-stub-)
* [RP-5. Prematurely Dealt Cards 🔴](#rp-5-prematurely-dealt-cards-)
* [RP-6. Efficient Movement of Players 🔴](#rp-6-efficient-movement-of-players-)
* [RP-7. Timing of Dealer Pushes 🔴](#rp-7-timing-of-dealer-pushes-)
* [RP-8: Hand for Hand Procedures 🔴](#rp-8-hand-for-hand-procedures-)
* [RP-9: Number of Players at Final Table 🔴](#rp-9-number-of-players-at-final-table-)
* [RP-10: Tournament Stud Dealing Procedures 🔴](#rp-10-tournament-stud-dealing-procedures-)
* [RP-11: Ante Formats and No Ante Reduction 🔴](#rp-11-ante-formats-and-no-ante-reduction-)
* [RP-12: Dealers Should Announce Bets and Raises 🔴](#rp-12-dealers-should-announce-bets-and-raises-)
* [RP-13: Dealers Should Stack Chips in Split-Pot Games 🔴](#rp-13-dealers-should-stack-chips-in-split-pot-games-)
* [RP-14: Randomness May be Applied to Special Situations 🔴](#rp-14-randomness-may-be-applied-to-special-situations-)
* [RP-15: Proper Tournament Staff Communication 🔴](#rp-15-proper-tournament-staff-communication-)
* [RP-16: Player Absent on a Breaking Table 🔴](#rp-16-player-absent-on-a-breaking-table-)
* [RP-17: Tournament Draw Betting Procedures 🔴](#rp-17-tournament-draw-betting-procedures-)
* [RP-18: Order of Mixed Games 🔴](#rp-18-order-of-mixed-games-)
* [RP-19: Reducing Stalling 🔴](#rp-19-reducing-stalling-)
* [RP-20: Cards Ready for Shuffle 🔴](#rp-20-cards-ready-for-shuffle-)
* [RP-21: Spreading the Pot 🔴](#rp-21-spreading-the-pot-)
* [RP-22: Betting Non-Denominational Items (Bounty chips, clock tokens etc) 🔴](#rp-22-betting-non-denominational-items-bounty-chips-clock-tokens-etc-)
* [Illustration Addendum 2024 Rules](#illustration-addendum-2024-rules)
* [Rule 10: Breaking Tables, 2-Step Random Process. 🔴](#rule-10-breaking-tables-2-step-random-process-)
* [Rule 11-D: Balancing Tables and Halting Play. 🔴](#rule-11-d-balancing-tables-and-halting-play-)
* [Rule 16: Face Up for All-Ins. 🔴](#rule-16-face-up-for-all-ins-)
* [Rule 18: Asking to See a Hand 🔴](#rule-18-asking-to-see-a-hand-)
* [Rule 38: Burns After Substantial Action 🔴](#rule-38-burns-after-substantial-action-)
* [Rule 40-A: Methods of Betting, Unclear or Contradictory Bets. 🟢](#rule-40-a-methods-of-betting-unclear-or-contradictory-bets-)
* [Rule 43: Raise Amounts. “The largest prior full bet or raise of the current betting round”. 🟢](#rule-43-raise-amounts-the-largest-prior-full-bet-or-raise-of-the-current-betting-round-)
* [Rule 45: Multiple Chip Betting. 🟡](#rule-45-multiple-chip-betting-)
* [Rule 46: Prior Bet Chips Not Pulled In, situation examples. 🔴](#rule-46-prior-bet-chips-not-pulled-in-situation-examples-)
* [Rule 47: Re-opening the bet. 🟡](#rule-47-re-opening-the-bet-)
* [Rule 51: Binding Declarations / Undercalls in Turn 🟡](#rule-51-binding-declarations--undercalls-in-turn-)
* [Rule 52-B: Incorrect Bet Amounts, Pot-Limit Games 🟡](#rule-52-b-incorrect-bet-amounts-pot-limit-games-)
* [Rule 53-A: Action Out of Turn (OOT) 🟡](#rule-53-a-action-out-of-turn-oot-)
* [Rule 53-B: Substantial Action Out of Turn (OOT). 🟡](#rule-53-b-substantial-action-out-of-turn-oot-)
<!-- vim-markdown-toc -->
## General Concepts
### 1: Floor Decisions 🔴
~~The best interest of the game and fairness are top priorities in decision-making. Unusual circumstances occasionally dictate that common-sense decisions in the interest of fairness take priority over technical rules. Floor decisions are final.~~
### 2: Player Responsibilities 🔴
~~Players should verify registration data and seat assignments, verify theyre dealt the correct number of cards before SA occurs, protect their hands, make their intentions clear, follow the action, act in turn with proper terminology and gestures, defend their right to act, keep cards visible and chips correctly stacked, remain at the table with a live hand, table all cards properly when competing at showdown, speak up if they see a mistake, play in a timely manner, call for a clock when warranted, transfer tables promptly, follow one player to a hand, know and comply with the rules, practice proper etiquette, inform the house if they see or experience discriminatory or offensive behavior, and generally contribute to an orderly event where all players feel welcome.~~
### 3: Official Terminology and Gestures 🔴
~~Official betting terms are simple, unmistakable, time-honored declarations like bet, raise, call, fold, check, all-in, complete, and pot (pot-limit only). Regional terms may also meet this test. Also, players must use gestures with caution when facing action; tapping the table is a check. It is the responsibility of players to make their intentions clear: using non-standard terms or gestures is at players risk and may result in a ruling other than what the player intended. See also Rules 2 and 42.~~
### 4: Player Identity 🔴
~~Players must be clearly identifiable at all times. Tournament staff may request a player to remove any item (sunglasses, hood, or other facial covering) which inhibits their identification or is a distraction to other participants.~~
### 5: Electronic Devices and Communication 🔴
- ~~A: Players may not talk on a phone at the table. Ring tones, music, images, video etc. should be inaudible and non-disturbing to others. These and other devices, tools, photography, videography, and communication must not create a nuisance, delay the game or create competitive advantage and are subject to house and gaming regulations.~~
- ~~B. Phones and other devices may not rest on the table.~~
- ~~C: Players with live hands may not interact with or operate an electronic or communication device. The definition of such devices may include new technologies and shall be as updated by the TD.~~
- ~~D: Betting apps, charts, and other poker strategy tools may not be used at the table. Nor may players receive or use poker strategy data from another person or source. Violations of Rule 5 may be subject to penalties in Rule 71.~~
### 6: Official Language 🔴
~~The house will clearly post and announce acceptable language(s) at the table.~~
## Seating, Breaking and Balancing Tables
### 7: Random Correct Seating 🟡
Tournament and satellite seats will be randomly assigned. A player starting in a wrong seat with a correct chip stack will move to the correct seat with their current total chip stack.
### 8: Alternates, Late Registration, and Re-Entries 🟡
- A: Alternates, players registering late, and re-entries will be sold full stacks. They will randomly draw a seat and table by the same process and from the same seat pool then in place for new players and are dealt in except between the small blind and button.
- B: In re-entry events, if a player is permitted to forfeit chips and buy a new stack, the forfeited chips will be removed from play.
### 9: Special Needs 🔴
~~Accommodations for players with special needs will be made when possible.~~
### 10: New Players and Players from Broken Tables 🔴
- ~~A: New players entering the tournament and players from broken tables can get any seat including the small or big blind or the button and be dealt in except between the SB and button.~~
- ~~B: Players from a broken table will be assigned new tables and seats by a 2-step random process. See Illustration Addendum.~~
### 11: Balancing Tables and Halting Play 🟡
- A: To balance in flop and mixed-games, the player to be big blind next moves to the worst position, including single big blind if available, even if that means the seat is big blind twice. Worst position is never the small blind. In stud-only, players move by position (last seat open at the short table is the seat filled).
- B: In mixed games (ex: HORSE), when the game shifts from holdem to stud, after the last holdem hand the button moves to the position it would be if the next hand was holdem and is frozen there during stud. The player moved in stud is the player who would be big blind if the game were holdem for that hand. Shifting to holdem the button starts where it was frozen.
- C: The table from which a player is moved will be specified by a predetermined procedure.
- D: Play will halt on tables 3 or more players short (by elimination) than the table with the most players once the blinds are impacted (See Illustration Addendum). Play halts on other formats (ex: 6-hand and turbos) at TDs discretion. TDs may waive halting play and waiver is not a misdeal. As the event progresses, at TDs discretion tables should be more tightly balanced.
## Pots / Showdown
### 12: Declarations. Cards Speak at Showdown 🟢
Cards speak to determine the winner. Verbal declarations of hand value are not binding at showdown but deliberately miscalling a hand may be penalized. Dealers should read and announce hand values at showdown. Any player, in the hand or not, should speak up if they think a mistake is made in reading hands or calculating and awarding the pot.
### 13: Tabling Cards and Killing Winning Hand 🔴
- ~~A: Proper tabling is both 1) turning all cards face up on the table and 2) allowing the dealer and players to read the hand clearly. “All cards” means both hole cards in holdem, all 4 hole cards in Omaha, all 7 cards in 7-stud, etc.~~
- ~~B: At showdown players must protect their hands while waiting for cards to be read (See also Rule 65). Players who dont fully table all cards, then muck thinking theyve won, do so at their own risk. If a hand is not 100% retrievable and identifiable and the TD rules it was not clearly read, the player has no claim to the pot. The TDs decision on whether a hand was sufficiently tabled is final.~~
- ~~C: Dealers cannot kill a properly tabled hand that was obviously the winner.~~
### 14: Live Cards at Showdown 🔴
~~Discarding non-tabled cards face down does not automatically kill them; players may change their minds and table cards that remain 100% identifiable and retrievable. Cards are killed by the dealer when pushed into the muck or otherwise rendered irretrievable and unidentifiable.~~
### 15: Showdown and Discarding Irregularities 🔴
- ~~A: If a player tables one card that would make a winning hand, the dealer should advise the player to table all cards. If the player refuses, the floor should be called.~~
- ~~B: If a player bets then discards thinking they have won (forgetting another player is still in the hand), the dealer should hold the cards and call the floor (a Rule 58 exception). If cards are mucked and not retrievable and identifiable to 100% certainty, the player is out and not entitled to a refund of called bets. If cards are mucked and the player initiated a bet or raise not yet called, the uncalled amount will be returned.~~
### 16: Face Up for All-Ins 🟢
All hands will be tabled without delay once a player is all-in and all betting action by all other players in the hand is complete. No player who is either all-in or has called all betting action may muck their hand without tabling. All hands in both the main and side pot(s) must be tabled and are live. See Illustration Addendum.
### 17: Non All-In Showdowns and Showdown Order 🟢
- A: In a non all-in showdown, if cards are not spontaneously tabled or discarded, the TD may enforce an order of show. The last aggressive player on the final betting round (final street) must table first. If there was no final round bet, the player who would act first in a final betting round must table first (i.e. first seat left of the button in flop games, high hand showing in stud, low hand in razz, etc.).
- B: A non all-in showdown is uncontested if all but one player mucks face down without tabling. The last player with live cards wins and is not required to table the cards.
### 18: Asking to See a Hand 🔴
- ~~A: Players not still in possession of cards at showdown, or who have mucked their cards face down without tabling, lose any rights or privileges to ask to see any hand.~~
- ~~B: If there was a river bet, any caller has an inalienable right to have the last aggressors hand tabled on request (“the hand they paid to see”) provided the caller tabled or retains his or her cards. TDs discretion governs all other requests such as to see the hand of another caller, or if there was no river bet. See Illustration Addendum [adopted 2013].~~
### 19: Playing the Board at Showdown 🔴
~~To play the board, players must table all hole cards to get part of the pot (See Rule 13-A).~~
### 20: Awarding Odd Chips 🔴
~~First, odd chips will be broken into the smallest denomination in play. A) Board games with 2 or more high or low hands: the odd chip goes to the first seat left of the button. B) Stud, razz, and if 2 or more high or low hands in stud/8: the odd chip goes to the high card by suit in the players 5-card winning hand. C) H/L split: the odd chip in the total pot goes to the high side. D) Deleted 2022.~~
### 21: Side Pots 🟡
Each side pot will be split separately.
### 22: Disputed Hands and Pots 🔴
~~The reading of a tabled hand may be disputed until the next hand begins (see Rule 23). Accounting errors in calculating and awarding the pot may be disputed until substantial action occurs on the next hand. If a hand finishes during a break, the right to any dispute ends 1 minute after the pot is awarded.~~
## General Procedures
### 23: New Hand and New Limits 🟢
A new level starts on announcement by the floor or audio signal by the clocking system. The new level applies to the next hand. Hands begin on the first riffle, push of the shuffler button, or on the dealer push. If a hand starts at the prior level by mistake, the hand will continue at the prior level after substantial action occurs (Rule 36). If a new level starts during the dealer push, the incoming dealer will deal one hand at the prior level.
### 24: Chip Race, Scheduled Color Ups 🟡
- A: At scheduled color-ups, chips will be raced off starting in seat 1, with a maximum of one chip awarded to a player. Players cant be raced out of play: a player losing their last chip(s) in a race will get 1 chip of the lowest denomination still in play.
- B: Players must have their chips fully visible and are encouraged to witness the chip race.
- C: If after the race, a player still has chips of a removed denomination, they will be exchanged for current denominations only at equal value. Chips of removed denominations that do not fully total at least the smallest denomination still in play will be removed without compensation.
### 25: Cards and Chips Kept Visible, Countable, and Manageable. Discretionary Color-Ups 🔴
- ~~A: Players, dealers, and the floor are entitled to a reasonable estimation of chip counts; thus, chips should be kept in countable stacks. The TDA recommends clean vertical stacks of 20 same denomination chips each as a standard. Higher denomination chips must be visible and identifiable at all times. If a floor person cant look at a chip stack and quickly estimate its value, players likely cant either.~~
- ~~B: TDs control the number and denominations of chips in play and may color up one or more players at their discretion at any time. Discretionary color ups are to be announced.~~
- ~~C: Players must keep live hands in plain view at all times.~~
### 26: Deck Changes 🔴
~~Deck changes will be on the dealer push or level changes or as prescribed by the house. Players may not ask for deck changes.~~
### 27: Re-buys 🔴
~~Players may not miss a hand. Players declaring intent to rebuy before a hand are playing chips behind and must make the re-buy.~~
### 28: Rabbit Hunting 🔴
~~Rabbit hunting (revealing cards that would have come if the hand had not ended) is not allowed.~~
### 29: Calling for a Clock 🟡
Players should act in a timely manner to maintain a reasonable pace of the game. If in TDs judgement reasonable time has passed, they may call the clock or approve a clock request by any player in the event. Players must be at their seats to call for a clock (Rule 30). A player on the clock has up to 25 seconds plus a 5 second countdown to act. If the player faces a bet and time expires, the hand is dead; if not facing a bet, the hand is checked. A tie goes to the player. TDs may adjust the time allowed and take other steps to fit the game and stop persistent delays. See also Rules 2 and 70.
## Player Present / Eligible for Hand
### 30: At Your Seat and Live Hands 🟢
To have a live hand, players must be at their seats when the last card is dealt to all players on the initial deal. Players not then at their seats may not look at their cards which are killed immediately. Their posted blinds and antes forfeit to the pot and an absent player dealt the stud bring-in card posts the bring-in. “At your seat” means in reach of your chair. This rule is not intended to encourage players to be out of their seats while in a hand.
### 31: At the Table with Action Pending 🔴
~~Players with live hands (including players all-in or otherwise finished betting) must remain at the table for all betting rounds and showdown. Leaving the table is incompatible with protecting your hand and following the action and is subject to penalty.~~
## Button / Blinds
### 32: Dead Button 🟡
Tournament play will use a dead button.
### 33: Dodging Blinds 🔴
~~Players who intentionally dodge any blind will incur a penalty. See Rule 71-B.~~
### 34: Button Placement and Movement 🟢
- A: If incorrect button movement is discovered before SA occurs, the error will be corrected. However, if SA has occurred, play will continue. Ex: If the button is moved twice and SA occurs the error will stand, the button will not be backed-up on the next hand. All players have a responsibility to monitor button placement and speak up if they see a mistake (Rule 2)
- B: Heads-up, the small blind is the button, is dealt the last card, and acts first pre-flop and last on all other betting rounds. Starting heads-up play, the button may need to be adjusted to ensure no player has the big blind twice in a row.
## Dealing Rules
### 35: Misdeals and Fouled Decks 🔴
- ~~A: Misdeals include but are not necessarily limited to: 1) 2 or more boxed cards on the initial deal; 2) first card dealt to the wrong seat; 3) cards dealt to a seat not entitled to a hand; 4) a seat entitled to a hand is dealt out; 5) the wrong number of cards is dealt to any player (except Rule 37); 6) Before SA, a non-standard card for the game type is found (example: jokers, 2-3-4-5 in short deck); 7) In flop games, if 1 of the first 2 cards dealt off the deck or any other 2 downcards are exposed by dealer error. House rules apply for draw games (ex: lowball).~~
- ~~B: Players may be dealt 2 consecutive cards on the button (see also Rule 37).~~
- ~~C: In misdeals, the re-deal is an exact re-play: the button doesnt move, no new players are seated, limits stay the same. Cards are dealt to players who were dealt-in but not at their seats for the original deal and they can play the re-deal (Rule 30). Players on penalty who were originally dealt-in will receive cards then their hands are killed. The original deal and re-deal count as 1 hand for a player on penalty, not 2.~~
- ~~D: Once substantial action occurs (see Rule 36) a misdeal cannot be declared; the hand must proceed unless the deck is fouled. Non-standard cards found after SA are treated as scraps of paper (exception: fouled decks).~~
- ~~E: Fouled decks.If 2 or more cards of the same suit and rank are found, the deck is fouled. Other fouled deck conditions may be defined by local gaming regulations and house policy. If a fouled deck is discovered, regardless of SA, play will stop and all bets will be returned. Once a hand concludes, the right to dispute based on a fouled deck ends according to Rule 22.~~
### 36: Substantial Action (SA) 🟡
Substantial Action is either A) any 2 actions in turn, at least one of which puts chips in the pot (i.e. any 2 actions except 2 checks or 2 folds) or B) any combination of 3 actions in turn (check, bet, raise, call, fold). Posted blinds do not count towards SA. See Rules 35-D and 53-B.
### 37: Button with Too Few Cards 🔴
~~A player on the button dealt too few cards should announce it immediately. Missing button cards may be replaced even after substantial action if permitted for the game type. However, if the button acts on a hand with too few cards (by check or bet), the buttons hand is dead.~~
### 38: Burns After Substantial Action 🔴
~~The burn card is to protect the stub, not “preserve card order”. If SA occurs and a hand is killed due to the wrong number of cards, all cards of the killed hand are mucked and randomness applies to further dealing (See also RP-14 Randomness). The stub is treated as a normal stub and one and only one card is burned off the stub for each subsequent street. The burn is always one card per street, never more. See Illustration Addendum.~~
### 39: Irregular Flops and Premature-Dealt Cards 🔴
- ~~A: 4-Card Flops. If the flop has 4 rather than 3 cards, exposed or not, and regardless of whether the door card is presumed known, the floor will be called. The dealer then scrambles the 4 cards face down, the floor randomly selects 1 as the next burn card and the other 3 are the flop (See also RP-14 Randomness).~~
- ~~B: If there was no burn on a 3-card flop, exposed or not and regardless of whether the door card is presumed known, if no action has occurred, the 3 cards are scrambled face down, one chosen as the burn. The flop will be the other 2 cards plus the next card off the stub. If any action (even one check) has occurred, play proceeds with the initial 3 cards. Only one card is burned for the turn.
- ~~C: For prematurely dealt cards, see Recommended Procedure 5.~~
- ~~D: Reshuffling During a Hand. To protect game integrity, anytime the stub must be re-shuffled during the play of a hand, the cards must be shuffled face-down and unexposed. Examples include premature cards (Rule 39 and RP-5), disordered stub (RP-4), extra draw or stud cards (RP-10-H), etc.~~
## Play: Bets and Raises
### 40: Methods of Betting: Verbal and Chips 🟢
- A: Bets are by verbal declaration and/or pushing out chips. If a player does both, whichever is first defines the bet. If simultaneous, a clear and reasonable verbal declaration takes precedence, otherwise the chips play. In unclear situations or where verbal and chips are contradictory, the TD will determine the bet based on the circumstances and Rule 1. See Illustration Addendum. See also Rule 57.
- B: Verbal declarations may be general (“call”, “raise”), a specific amount only (“one thousand”) or both (“raise, one thousand”).
- C: For all betting rules, declaring a specific amount only is the same as silently pushing out an equal amount. Ex: Declaring “two hundred” is the same as silently pushing out 200 in chips.
### 41: Methods of Calling 🟢
Standard and acceptable forms of calling include: A) saying “call”; B) pushing out chips equal to a call; C) silently pushing out an overchip; or D) silently pushing out multiple chips equal to a call under the multi-chip rule (Rule 45). Silently betting chip(s) relatively tiny to the bet (ex: blinds 2k-4k. A bets 50k, B then silently puts out one 1k chip) is non-standard, strongly discouraged, subject to penalty, and will be interpreted at TDs discretion, including being ruled a full call.
### 42: Methods of Raising 🟢
In no-limit or pot-limit, a raise must be made by A) pushing out the full amount in one motion or B) verbally declaring the full amount prior to pushing out chips. It is the responsibility of players to make their intentions clear. Note: 2-motion raises eliminated in 2019.
### 43: Raise Amounts 🟢
- A: A raise must be at least equal to the largest prior full bet or raise of the current betting round. A player who raises 50% or more of the largest prior bet but less than a minimum raise must make a full minimum raise. If less than 50% it is a call unless “raise” is first declared or the player is all-in (Rule 45-B). Declaring an amount or pushing out the same amount of chips is treated the same (Rule 40-C). Ex: NLHE, opening bet is 1000, verbally declaring “Fourteen hundred” or silently pushing out 1400 in chips are both calls unless raise is first declared. See Illustration Addendum.
- B: Without other clarifying information, declaring raise and an amount is the total bet. Ex: A opens for 2000, B declares “Raise, eight thousand.” The total bet is 8000.
### 44: Oversized Chip Betting (Overchips) 🔴
~~If facing a bet or blind, pushing out a single oversized chip (including your last chip) is a call if raise isnt first declared. To raise with an overchip you must declare raise before the chip hits the table surface. If raise is declared but no amount is stated, the raise is the maximum allowable for the chip. If not facing a bet, pushing out an overchip silently (no declaration) is a bet of the maximum for the chip.~~
### 45: Multiple Chip Betting 🔴
- ~~A: If facing a bet, unless raise or all-in is declared first, a multiple-chip bet (including a bet of your last chips) is a call if every chip is needed to make the call; i.e. removal of just one of the smallest chips leaves less than the call amount. Ex-1: Player A opens for 400: B raises to 1100 total (a 700 raise), C puts out one 500 and one 1000 chip silently. This is a call because removing the 500 chip leaves less than the 1100 call amount. Ex-2: NLHE 25-50. Post-flop A opens for 1050 and B puts out his last chips (two 1000s). B calls unless raise or all-in was first declared.~~
- ~~B: If every chip is not needed to make the call; i.e. removing just one of the smallest chips leaves the call amount or more: 1) if the player has chips remaining, the 50% standard in Rule 43 governs the bet. 2) A bet of a players last chip(s) is an all-in bet whether reaching the 50% threshold or not. See Addendum.~~
### 46: Prior Bet Chips Not Pulled In 🔴
- ~~A: To avoid confusion, players with prior-bet chips not yet pulled in who face a raise should verbalize their action before adding chips to the prior bet.~~
- ~~B: If facing a raise, clearly pulling back a prior bet chip binds a player to call or raise; they may not put the chip(s) back out and fold.~~
- ~~C: If new chip(s) are added silently and the bet is unclear to the house, the call and raise rules 41-45 apply as follows: 1) If prior chips dont cover the call AND are either left alone OR fully pulled back, an overchip is a call and multiple new chips are subject to the 50% raise standard (Rule 43). 2) If prior chips are partly pulled back OR if prior chip(s) cover the call, the combined final chip bet is a raise if reaching the 50% standard (Rules 43 and 45), if less it is a call. See Illustration Addendum.~~
### 47: Re-Opening the Bet. 🟡
- A: In no-limit and pot limit, an all-in wager (or cumulative multiple short all-ins) totaling less than a full bet or raise will not reopen betting for players who have already acted and are not facing at least a full bet or raise when the action returns to them. If multiple short all-ins re-open the betting, the minimum raise is always the last full valid bet or raise of the round (See also Rule 43).
- B: In limit, at least 50% of a full bet or raise is required to re-open betting for players who have already acted. See Illustration Addendum.
### 48: Number of Allowable Raises 🟡
There is no cap on the number of raises in no-limit and pot-limit. In limit play, there is a limit to raises even when heads-up until the event is down to 2 players; the house limit applies.
### 49: Accepted Action 🟢
Poker is a game of alert, continuous observation. It is the callers responsibility to determine the correct amount of an opponents bet before calling, regardless of what is stated by others. If a caller requests a count but receives incorrect information from a dealer or player, then pushes out that amount or declares call, the caller has accepted the full correct action and is subject to the correct wager or all-in amount. As with all situations, Rule 1 may apply at TDs discretion. See also RP-12.
### 50: Acting in Turn 🟢
- A: Players must act in turn verbally and/or by pushing out chips. Action in turn is binding and commits chips to the pot that stay in the pot.
- B: Players must wait for clear bet amounts before acting. Ex: NLHE, A says “raise” (but no amount), and B quickly folds. B should wait to act until As raise amount is clear.
### 51: Binding Declarations / Undercalls in Turn 🟡
- A: General verbal declarations in turn (such as “call” or “raise”) commit a player to the full current action. See Illustration Addendum
- B: A player undercalls by declaring or pushing out less than the call amount without first declaring “call”. An undercall is a mandatory full call if made in turn facing 1) any bet heads-up or 2) the opening bet on any round multi-way. In other situations, TDs discretion applies. The opening bet is the first chip bet of each betting round (not a check). In blind games the posted BB is the pre-flop opener. All-in buttons reduce undercall frequency (See Recommended Procedure 1). This rule governs when players must make a full call and when, at TDs discretion they may forfeit the amount of the intended undercall and fold (see Illustration Addendum). For underbets and underraises, see Rule 52.
- C: If two or more undercalls occur in sequence, play backs up to the first undercaller who must correct his or her bet per Rule 51-B. The TD will determine how to treat hands of the remaining bettors based on the circumstances.
### 52: Incorrect Bets, Underbets and Underraises 🟡
- A: In limit and no-limit, opening or raising less than the minimum legal amount is corrected anywhere on the current street (if on the river any time before showdown starts). Ex: NLHE 100-200, post-flop A opens for 600 and B raises to 1000 (a 200 underraise). C and D call, E folds then the error is noticed. Increase the bet to 1200 total for all bettors any time before the turn is dealt. After the turn the error stands. For undercalls, see Rule 51.
- B: In pot limit, if a player underbets the pot based on an inaccurate count, if the pot count is too high (an illegal bet), it will be corrected for all players anywhere on the current street; if too low, corrected until substantial action occurs after the bet. See Illustration Addendum.
### 53: Action Out of Turn (OOT) 🟡
- A: Any action out of turn (check, call, or raise) will be backed up to the correct player in order. The OOT action is subject to penalty and is binding if action to the OOT player does not change. A check, call or fold by the correct player does not change action. If action changes, the OOT action is not binding; any bet or raise is returned to the OOT player who has all options: call, raise, or fold. An OOT fold is binding. See Illustration Addendum.
- B: Players skipped by OOT action must defend their right to act. If a skipped player had reasonable time and does not speak up before substantial action (Rule 36) OOT occurs after the player, the OOT action is binding. Action backs up and the floor will rule on how to treat the skipped hand given the circumstances, including ruling the hand dead or limiting the player to non-aggressive action. See Addendum.
### 54: Pot Size and Pot-Limit Bets 🟡
- A: Players are entitled to a pot count in pot-limit only. Dealers will not count the pot in limit and no-limit. See also RP-22 Spreading the Pot
- B: Pre-flop a dead or short all-in blind will not affect pot calculation. All pre-flop pot and re-pot bets will assume full blinds were posted. Ex 1: PLO, 100-200 blinds, dead SB, BB posts 200. Ex 2: SB posts 100, BB short posts 100. In both examples the pot-limit bet for first player to act is 700.
- C: Post-flop, bets are based on actual pot size.
- D: Declaring “I bet the pot” is not a valid bet in no-limit but it does bind the player to making a valid bet (at least a minimum bet) and may be subject to penalty. Players facing a bet must make a valid raise.
### 55: Invalid Bet Declarations 🔴
~~If a player faces no bet and: A) declares “call”, it is a check; B) declares “raise”, the player must make at least a minimum bet. A player declaring “check” when facing a bet may call or fold, but cannot raise.~~
### 56: String Bets and Raises 🟡
String bets and raises are not allowed. Such wagers involve multiple movements whereby a player puts out a bet then returns to their stack for more chips to add to the bet.
### 57: Non-Standard and Unclear Betting 🟡
Players use unofficial betting terms and gestures at their own risk. These may be interpreted to mean other than what the player intended. Also, if a declared bet can legally have multiple meanings, it will be ruled the highest reasonable amount that is less than or equal to the pot size* before the bet. Ex: NLHE 200-400, the pot totals less than 5000, player declares “I bet five.” With no other clarifying information, the bet is 500; if the pot totals 5000 or more, the bet is 5000. *The pot is the total of all prior bets including any bets in front of a player not yet pulled in. See Rules 2, 3, 40 and 42.
### 58: Non-Standard Folds 🔴
~~Any time before the end of the final betting round, folding in turn if theres no bet to you (ex: facing a check or first to act post-flop) or folding out of turn are binding folds subject to penalty. See also 15-B.~~
### 59: Conditional and Premature Declarations 🟡
- A: Conditional statements of future action are non-standard and strongly discouraged. At TDs discretion they may be binding and/or penalized. Example: “if then” statements such as “If you bet, I will raise.”
- B: If Player A declares “bet” or “raise” and B calls before As exact bet amount is known, the TD will rule the bet as best fits the situation including possibly obliging B to call any amount.
### 60: Count of Opponents Chip Stack 🟡
Players, dealers, and the floor are entitled to a reasonable estimation of opponents chip stacks (Rule 25). A player may request a more precise count only if facing an all-in bet and it is his or her turn to act. The all-in player is not required to count; on request the dealer or floor will count it. Accepted action applies (Rule 49). Visible and countable chip stacks (Rule 25) greatly improve counting accuracy.
### 61: Over-Betting Expecting Change 🔴
~~Betting should not be used to obtain change. Pushing out more than the intended bet can confuse everyone at the table. All chips pushed out silently are at risk of being counted in the bet. Ex: the opening bet is 325 to player A who silently puts out 525 (one 500 and one 25), expecting 200 change. This is a raise to 650 under the multiple chip rule (Rule 45).~~
### 62: All-In with Chips Found Behind Later 🟡
If A bets all-in and a hidden chip is found behind after a player calls, the TD will determine if the chip behind is part of accepted action (Rule 49). If not part of the action, A is not paid off for the chip(s) if he or she wins. If A loses, he or she is not saved by the chip(s) and the TD may award the chip(s) to the winning caller.
## Play: Other
### 63: Chips Out of View and in Transit 🔴
~~Players may not hold or transport chips in a way that takes them out of view. A player who does so will forfeit the chips and may be disqualified. The forfeited chips will be taken out of play. The TDA recommends the house provide racks or bags to transport chips when needed.~~
### 64: Lost and Found Chips 🔴
~~Lost and found chips for which ownership cannot be determined will be taken out of play and returned to tournament inventory.~~
### 65: Accidentally Killed / Fouled / Exposed Hands 🟢
- A: Players must protect their hands at all times, including at showdown while waiting for hands to be read. If the dealer kills a hand by mistake or if in TDs judgement a hand is fouled and cannot be identified to 100% certainty, the player has no redress and is not entitled to a refund of called bets. If the player initiated a bet or raise and hasnt been called, the uncalled amount will be returned.
- B: If a hand is fouled but can be identified, it remains in play despite any cards exposed.
### 66: Dead Hands and Mucking in Stud 🔴
~~In stud poker, if a player picks up the upcards while facing action, the hand is dead. Proper mucking in stud is turning down all up cards and pushing them all forward face down.~~
## Etiquette and Penalties
### 67: No Disclosure. One Player to a Hand 🟢
Players must protect other players in the tournament at all times. Therefore players, whether in the hand or not, must not:
1. Discuss contents of live or mucked hands,
2. Advise or criticize play at any time,
3. Read a hand that hasnt been tabled.
One-player-to-a-hand is in effect. Among other things, this rule prohibits showing a hand to or discussing strategy with another player, advisor, or spectator.
### 68: Exposing Cards and Proper Folding 🔴
~~Exposing cards with action pending, including the current player when last to act, may result in a penalty but not a dead hand. Any penalty begins at the end of the hand. When folding, cards should be pushed forward low to the table, not deliberately exposed or tossed high (“helicoptered”). See Rule 66.~~
### 69: Ethical Play 🔴
~~Poker is an individual game. Soft play will result in penalties, which may include chip forfeiture and/or disqualification. Chip dumping and other forms of collusion will result in disqualification.~~
### 70: Etiquette Violations 🔴
~~Etiquette violations are subject to enforcement actions in Rule 71. Examples include but are not limited to: persistent delay of the game, unnecessarily touching another players person, cards or chips, repeatedly acting out of turn, maintaining poor card or chip visibility and countability, betting out of reach of the dealer, abusive conduct, offensive hygiene, and excessive chatter.~~
### 71: Warnings, Penalties, and Disqualification 🔴
- ~~A: Enforcement options include but are not limited to verbal warnings, one or more “missed hand” or “missed round” penalties, and disqualification. For missed rounds, the offender will miss one hand for every player (including him or her) at the table when the penalty is given multiplied by the number of penalty rounds. Repeat infractions are subject to escalating penalties. Players away from the table or on penalty may be anted or blinded out of a tournament.~~
- ~~B: A penalty may be invoked for etiquette violations (Rule 70), card exposure with action pending, throwing cards, violating one-player-to-a-hand, improper use of devices or strategy tools (Rule 5), or similar incidents. Penalties will be given for soft play, abuse, disruptive behavior, dodging blinds or cheating. Checking the exclusive nuts when last to act on the river is not an automatic soft play violation; TDs discretion applies based on the situation.~~
- ~~C: Players on penalty must be away from the table. Cards are dealt to their seats, their blinds and antes posted, their hands are killed after the initial deal, and if dealt the stud bring-in they must post the bring-in.~~
- ~~D: Chips of a disqualified player shall be removed from play.~~
## 2024 Recommended Procedures
> Version 1.0, October, 2024
TDA Recommended Procedures are policy suggestions to reduce errors and improve event management. They also may apply to situations with too many variations to address in one universal rule. The fairest ruling in these cases may require use of multiple rules, evaluation of all circumstances, and reliance on Rule 1 as a primary guide.
### RP-1. All-In Buttons 🔴
~~All-in buttons clearly indicate a player is “all-in.” The dealer should keep the buttons (not each player). When a player bets all-in, the dealer places an all-in button in front of the player, in full view of the rest of the table.~~
### RP-2. Bringing in Bets is Discouraged 🔴
~~Routinely bringing in chips as betting and raising proceeds around the table is poor dealing practice. Reducing bet stacks can influence action, create confusion and increase errors. Only the player currently facing action may ask the dealer to bring-in bets.~~
### RP-3. Personal Belongings 🔴
~~The table surface is vital for chip stack management, dealing, and betting. The table and nearby spaces (legroom and walkways) must not be cluttered by non-essential personal items. Each cardroom should clearly display its policy on items allowed in the tournament area.~~
### RP-4. Disordered Stub 🔴
~~When cards remain to be dealt on a hand and the stub is accidentally dropped and appears to be disordered: 1) first try to reconstruct the stub in its original order if possible; 2) If not possible, create a new stub using only the stub cards (not the muck and prior burns). These should be scrambled, shuffled, cut, and play proceeds with the new stub; 3) If when dropped the stub is mixed in with the muck and/or burns, then scramble the mixed cards together, shuffle, and cut. Play proceeds with the new stub.~~
### RP-5. Prematurely Dealt Cards 🔴
~~Board and burn cards are sometimes dealt prematurely, before action on the preceding round is finished. The general procedures for these situations are:~~
- ~~A: Premature flop, leave the flop burn card as the burn. Return the premature board cards to the deck stub and reshuffle the entire stub. Re-deal the flop (without another burn) from the newly shuffled stub.~~
- ~~B: A premature turn card: leave the turn burn card as the burn. Return the premature turn card to the deck stub and reshuffle the entire stub. Re-deal the turn (without another burn) from the newly shuffled stub~~
- ~~C: A premature river card: leave the river burn card as the burn. Return the premature river card to the deck stub and reshuffle the entire stub. Re-deal the river (without another burn) from the newly shuffled stub~~
- ~~D: Premature card in stud: the premature card is returned to the stub, the stub is re-shuffled (See RP-17, reshuffling), and a new street is dealt from the newly shuffled stub without another burn.~~
### RP-6. Efficient Movement of Players 🔴
~~Moving players for breaking and balancing should be expeditious so as not to unduly miss blinds or otherwise delay the game. If possible, players should have racks for chip transport and sufficient color-ups should be done so players do not carry unusually large numbers of chips (see Rules 10, 11 and 63).~~
### RP-7. Timing of Dealer Pushes 🔴
~~The TDA recommends that dealers hold up the push 90 seconds prior to a scheduled break or a level change. This avoids having time expire in crucial stages of the game.~~
### RP-8: Hand for Hand Procedures 🔴
- ~~A: Payoff eligibility starts at the announcement: “finish the current hand youre on then hold up, we are going hand for hand”. If enough players bust on the current hand to break into the money, the busting players will be eligible for a share of the place(s) paid on the current hand. Example: NLHE tournament paying 50 players. 52 players remain when the announcement is made and during the current hand 3 players bust. All 3 players will share in the 50th place payout.~~
- ~~B: During H4H play, a maximum of 3 minutes per hand will be deducted from the clock.~~
- ~~C: So that players can most clearly know the timing of level changes, whenever possible the clock should be reduced by 2-minutes each hand not after “batches” of multiple hands.~~
- ~~D: Blinds continue to increase as time elapses off the clock at the rate of 2 minutes per hand and new levels are reached.~~
- ~~E: Players are encouraged but not required to remain seated during H4H play.~~
- ~~F: In the event of an all-in and call during H4H, the cards of all players in the hand should remain face down. Dealers should not deal additional cards until instructed.~~
### RP-9: Number of Players at Final Table 🔴
~~9 and 8-handed events will combine from two tables of five players each to a 9-handed final table. 7 and 6-handed events will combine from two tables of four players each to a 7-handed final table.~~
### RP-10: Tournament Stud Dealing Procedures 🔴
- ~~A: A downcard exposed on the initial deal will be the players upcard and 3rd street will be dealt down to that player. The player can be the bring-in.~~
- ~~B: A card exposed by the dealer on 7th street will be replaced if betting action remains on the hand. 7th street should be dealt down even if no betting action remains on the hand and in all-in situations the player(s) not at risk expose first.~~
- ~~C: Cards of a player not at his or her seat (See Rule 30) for the deal will be killed. No cards will be dealt to a hand on 4th street that is not live.~~
- ~~D: If there are two or more matching high hands showing in Stud (or Stud-8) or low hands in Razz, betting starts on the hand with the high card by suit in both games.~~
- ~~E: If the player dealt the low card by suit is all-in for the ante, betting starts to his or her left. Players with chips must bet at least the bring-in or fold.~~
- ~~F: Bets will not be doubled on 4th street for a pair showing.~~
- ~~G: For premature cards dealt in stud see RP-5-D.~~
- ~~H: 7th street short stub procedure. If before dealing 7th street the number of cards in the current stub is less than the “required number” (# remaining players + burn card + undealt last card) proceed as follows: A) if the required number can be reached by adding the 3 prior burn cards (for 4th, 5th, and 6th street) the current stub will be scrambled with the prior burns to create a new stub. The new stub will be cut, a card burned, and one card dealt to each player. B) if there are at least 3 cards in the current stub but adding the prior burns would not reach the required number, the dealer will burn the top card of the current stub and deal the next card as a community card in the center of the table. C) if the current stub has less than 3 cards, it will be scrambled with the 3 prior burns for a new stub which will then be cut, a card burned, and the next card dealt as a community card. D) If a community card is in play, the first player who would act on 6th street will be first to act on 7th street.~~
### RP-11: Ante Formats and No Ante Reduction 🔴
~~If a single-payer ante is used, the big blind ante format (BBA) with big-blind-first calculation is recommended. Antes should not be reduced (including at the final table) as play progresses in the event.~~
### RP-12: Dealers Should Announce Bets and Raises 🔴
~~Dealers should routinely announce non-all-in bet values as betting proceeds around the table. All-in bets will be counted only on request of the player currently facing action. Accepted action continues to apply (Rule 49). Scheduled and discretionary color-ups improve bet countability.~~
### RP-13: Dealers Should Stack Chips in Split-Pot Games 🔴
~~Where possible, dealers should periodically stack pot chips in split-pot games. Stacking chips should not obscure players view or otherwise disrupt the game.~~
### RP-14: Randomness May be Applied to Special Situations 🔴
~~For error remedies not otherwise covered in the TDA Rules and Procedures, TDs may use the concept of randomness to design a solution.~~
### RP-15: Proper Tournament Staff Communication 🔴
- ~~A: Outgoing dealers should inform incoming dealers of pertinent information regarding the table. Examples include: blind information, players on warning or penalties, disruptive behavior.~~
- ~~B: The dealer should inform the floor of all existing and potential infractions of Rule 2 (Player Responsibilities) and Rule 70 (Etiquette). Special emphasis on any discriminatory or offensive behavior in general or towards specific players or staff.~~
### RP-16: Player Absent on a Breaking Table 🔴
~~If a player is not present during breaking of a table, their chips should be moved to the new table by a staff member.~~
### RP-17: Tournament Draw Betting Procedures 🔴
~~Limping is allowed in all single-draw games.~~
### RP-18: Order of Mixed Games 🔴
~~In order to reduce errors, in mixed game events (ex HORSE), stud and stud-8 need not be played consecutively.~~
### RP-19: Reducing Stalling 🔴
~~The house should clearly announce intention to reduce stalling so that players understand timely play is expected. Its recommended that each house establish creative methods for reducing stalling. Some methods successfully used by TDA member houses include:
Random table breaks instead of table draws, using fixed # of hands per level, going orbit for orbit, soft hand for hand, and adding a shot clock~~
### RP-20: Cards Ready for Shuffle 🔴
~~At the start of the tournament of ending of a break, within one minute of starting or resuming play, the floor should announce “dealers prepare your decks”. When at least 2 players are at the table, the dealer will wash and square the deck, to be ready for shuffle when the level starts.~~
### RP-21: Spreading the Pot 🔴
~~The pot will only be counted in pot-limit events. On request the pot may be spread to increase chip visibility. See also Rule 54: Pot Size and Pot-Limit Bets.~~
### RP-22: Betting Non-Denominational Items (Bounty chips, clock tokens etc) 🔴
~~Action items with no nominal value (bounty chips, clock tokens etc) should be of different size than standard betting chips. Betting with these items will be interpreted per house policy or Rule 1 and may be ruled a call or all-in at TDs discretion.~~
## Illustration Addendum 2024 Rules
> Version 1.0, October, 2024
The Poker TDA is a voluntary poker industry association founded in 2001. The TDA mission is to increase global uniformity of poker tournament rules. TDA Rules supplement the rules of this house. In case of conflict with a gaming agency, the agency rules apply.
### Rule 10: Breaking Tables, 2-Step Random Process. 🔴
~~A 2-step random or “double-blind” process assures that there is no favoritism in distributing new seat assignments. An example of one such process: 1) show players at the breaking table the new seat cards then scramble the cards face down and form a stack; 2) the dealer then deals one playing card face up to each player. The seat cards are then dealt out with the first seat card going to the player with the highest playing card by suit showing.~~
### Rule 11-D: Balancing Tables and Halting Play. 🔴
- ~~Example: NLHE 9-handed, table A has 5 players, table B has the most players with 8. Play halts on table A once the BB hits an open seat.~~
### Rule 16: Face Up for All-Ins. 🔴
~~“All hands will be tabled without delay once a player is all-in and all betting action by all other players in the hand is complete”. This rule means that all downcards of all players will be turned up at once when at least one player is all-in and there is no chance of further betting action by the other player(s). Do not wait for the showdown to turn the cards up; do not wait for side pots to be divided before turning up the all-in who is only in for the main pot; if betting action is finalized on any street prior to the showdown, turn the cards up at that point and then run out the remaining cards.~~
- ~~Example 1. NLHE. Two players remain. On the turn, Player A (the shorter stack) pushes all-in and is called by B. Turn both A and Bs downcards up at this point, then burn and turn the river and proceed to showdown.~~
- ~~Example 2. NLHE. Three players remain.
Pre-flop, Player A (the shortest stack) pushes all-in and is called by both B and C. Do not turn cards up yet because B and C both have chips so further betting action is possible.~~
~~On the flop B and C check; betting is still possible so dont turn the cards up yet.~~
~~On the turn B pushes all-in and C calls. Turn all hands up now (A, B, and C) because no further betting is possible. Burn and turn the river then proceed to showdown. Award the side pot between B and C first, then award the main pot. Notice: you do not keep As cards face down until the side pot between B and C is awarded.~~
- ~~Example 3. NLHE. Three players remain.
Pre-flop, Player A (the shortest stack) pushes all-in for 700 and is called by both B and C who have several thousand each left. Do not turn cards up yet because B and C both have chips so further betting action is possible.~~
~~On the flop B and C check; betting is still possible so dont turn the cards up yet.
On the turn B bets 1000 and C calls. Since both B and C still have chips and the river remains to be dealt, betting is still possible so dont turn the cards up yet.~~
~~On the river both B and C check. Turn all hands up now (A, B, and C) because betting is over and the hand is moving to showdown. Award the 2000 side pot between B and C first, then award the main pot. Notice: do not keep As cards face down until the side pot between B and C is awarded.~~
### Rule 18: Asking to See a Hand 🔴
- ~~Example 1: NLHE. 3 players remain in the hand. There is no betting on the river and no player is all-in. At showdown Player A discards face down and the cards are pushed into the muck by the dealer. B tables his hand, showing trips. C pushes his cards forward face-down. B may ask to see Cs hand because B has tabled his cards. However, Bs request is at TDs discretion; B has no inalienable right to see it because there was no bet on the river thus he did not “pay to see Cs hand.” Neither A nor C may ask to see a competitors hand because they have neither tabled their cards nor retained them.~~
- ~~Example 2: NLHE. 4 players remain in the hand. On the river A bets 1000, B calls, C raises to 5000, and D, A and B all call. No player is all-in. B tables his hand, showing trips. D instantly discards face down and the dealer kills his hand into the muck. C begins to push his cards forward face-down. Both A and B have an inalienable right to see Cs hand on request because 1) they paid to see it as C was the last aggressor on the river and 2) both A and B retain their cards. D (who also called C) relinquished his right to see Cs hand when he discarded without tabling. All other requests in this situation are at TDs discretion, such as B asking to see As cards (the cards of another caller).~~
### Rule 38: Burns After Substantial Action 🔴
- ~~Example 1-A: THE 50-100. SB / BB in seats 1 and 2. Pre-flop, initial cards dealt to all players. SB / BB in seats 1 and 2. Seat 3 (UTG) folds and Seat 4 calls, completing substantial action with 2 actions with chips. Seat 5 then realizes they have only 1 card and the hand is dead because SA has occurred. The dealer will burn only one card and then put out the flop. The dealer will not burn 2 cards to “return to the original stub order”.~~
- ~~Example 1-B: Same game and initial deal. Seat 3 (UTG) folds and Seat 4 calls, completing substantial action. Seat 5 then realizes they have 3 cards and the hand is dead because SA has occurred. The dealer will burn one card and then put out the flop. The dealer will not consider Seat 5s third card as the burn and put out the flop without a burn off the stub.~~
### Rule 40-A: Methods of Betting, Unclear or Contradictory Bets. 🟢
“In unclear situations or where verbal and chips are contradictory, the TD will determine the bet based on the circumstances and Rule 1”.
- Example 1: THE, heads-up on the river Player A verbally declares “forty-two thousand” but pushes out only a 5k chip. Not everyone at the table heard the declaration. Player B pushes out 5k to call. Both players table and A has the best hand. Ruling criteria is mixed: verbal came first but wasnt necessarily clear. The chip appeared to be a bet of 5k. In these unclear and contradictory situations, the TD will make the fairest ruling possible using Rule 1.
### Rule 43: Raise Amounts. “The largest prior full bet or raise of the current betting round”. 🟢
This line refers to the largest additional action or “last legal increment” by a preceding bettor in the current round. The current round is the “current street”, i.e. pre-flop, flop, turn, river in board games; 3rd 4th 5th 6th 7th street in 7-stud, etc.
- Example 1: NLHE, Blinds 100-200. Post-flop, A opens with a bet of 600. B raises 1000 for total of 1600. C re-raises 2000 for total of 3600. If D wants to raise, he must at least raise the “largest bet or raise of the current round”, which is Cs raise of 2000. So, D must re-raise at least 2000 more for a total of 5600. Note that Ds minimum raise is not 3600 (Cs total bet), but only 2000, the additional raise action that C added.
- Example 2: NLHE, Blinds 50-100. Pre-flop A is under the gun and goes all-in for a total of 150 (an increase in the bet of 50). So, we have a 100 blind bet and an all-in wager that increases the total by 50. Which is larger? The 100 is still the “largest bet or raise of the current round”, so if B wants to re-raise he must raise at least 100 for a total of 250.
- Example 3: NLHE, Blinds 100-200. On the turn A bets 300. B pushes out two 500 chips making the total 1000 (a 700 raise). It is 1000 to C to call. If C wants to raise, it must be “at least the largest bet or raise of the current round”, which is Bs raise of 700. So, Cs minimum raise would be 700 for a total of 1700. Note his minimum raise is not 1000, Bs total bet.
- Example 4-A: NLHE, Blinds 25-50. A raises 75 to 125 total. Notice that 125 total = 50 (bet) plus 75 (raise). The next raise on this street must be “at least the size of the largest previous bet or raise”, which is 75. B now raises the minimum (75) to 200 total. C then re-raises 300 for total of 500. We now have a bet of 50, two raises of 75 and a raise of 300 for total of 500. If D wants to re-raise, “the raise must be at least the size of the largest previous bet or raise of the current betting round”, which is now 300. So, D must raise at least 300 more to a total of 800.
- Example 4-B: Same as 4-A. Its the same 500 to D, but theres just been one raise of 450 by A to a total of 500 and B and C have both called. So, theres a blind bet of 50 and a raise of 450. “A raise must be at least the size of the largest previous bet or raise of the current betting round”, which is As raise of 450. So, its 500 for D to call, and if D wants to re-raise he must raise at least 450 for a total of 950.
### Rule 45: Multiple Chip Betting. 🟡
“A: If facing a bet, unless raise or all-in is declared first, a multiple-chip bet (including a bet of your last chips) is a call if every chip is needed to make the call; i.e. removal of just one of the smallest chips leaves less than the call amount. B: If every chip is not needed to make the call; i.e. removal of just one of the smallest chips leaves the call amount or more: 1) if the player has chips remaining, the bet is governed by the 50% standard in Rule 43; 2) if the players last chips are bet he or she is all-in whether reaching the 50% threshold or not.”
- Example 1: There is not one chip that can be removed and still leave the call amount.
- 1-A: Player A opens post flop for 1200, B silently puts out two 1000s. This is a call because neither chip can be removed and still leave at least 1200.
- 1-B: NLHE, blinds 250-500. Preflop the UTG raises 600 to total of 1100. The UTG+1 silently puts out one 500 and one 1000 chip. This is a call because neither the 500 nor the 1000 can be removed and still leave at least 1100.
- Example 2: Same as 1-B above except the UTG+1 puts out one 1000 and five 100s silently. Four of the 100s could be removed and still leave the 1100 call amount. Therefore, this would be subject to the 50% standard in Rule 43: the minimum raise is 600, 50% of 600 is 300, therefore, if the UTG+1 puts out 1400 or more, he will be held to making a full raise to 1700 total. Since the UTG put out 1500 he must raise in this example.
- Example 3: Same as 2 above except the UTG+1 puts out one 1000 and three 100s silently. Two of the 100s can be removed and still leave the 1100 call amount therefore this is subject to Rule 43. Since the player did not put out at least 50% of a minimum raise, this bet is ruled a call and 200 is returned to the player.
- Example 4: Multiple-chip bet of all chips. A) If all chips are needed to make the call, this is treated exactly the same as a player with chips behind (See example 1 above). B) If removing just one of the smallest chips leaves the call amount or more, the player is all-in regardless of whether the bet reaches the 50% raise standard.
- Example 4-A: A opens for 1400, B (with remaining chips behind in large chip stack) silently pushes out one 1000 and three 500s. This is a mandatory min-raise to 2800 because the 50% threshold of 2100 (1400+700=2100) is reached.
- Example 4-B: Same 1400 opener, B (with remaining chips behind in large chip stack) puts out one 1000 and two 500s. This is a call because it is short of the 50% threshold of 2100. NOTE: In both example 4-A and 4-B, Player B would be all-in if putting out his or her last chips.
### Rule 46: Prior Bet Chips Not Pulled In, situation examples. 🔴
- ~~Situation 1: If prior chips dont cover the call AND are left alone. Ex: THE 25-50, the BB posts two 25s, button raises to 600 total (550 more to BB).
1: Adding an overchip is a call (drop a 1k chip onto the two 25s).
2: Adding multiple new chips is a call if all new chips are needed to call a) drop two 500s onto the two 25s or b) drop a 100 and 500 chip onto the two 25s. In these two examples all new chips when combined with the prior chips are needed to make the call.
3: Adding multiple new chips is a Rule 45 multiple chip bet if one of the smallest new chips is not needed to make the call (drop a 1k and 500 chip onto the two 25s is a total bet of 1550). Per Rule 45, a silent multi-chip bet is a raise if it hits the 50% threshold; otherwise it is a call.~~
- ~~Situation 2: If prior chips dont cover the call AND are fully pulled back:~~
~~1) Removing all prior chips and adding an overchip is a call (pull back the two 25s, add 1k chip).~~
~~2) Removing all prior chips and adding new multiple chips is a Rule 45 bet (pull back two 25s, add two or more new chips).~~
- ~~Situation 3: if prior chip(s) are partly pulled back (whether or not they cover the call amount)~~
~~1) Partial removal of prior chips (pull back one 25, leave the other 25 out, add any new chip(s), is a Rule 45 multiple-chip bet (a raise if hitting 50%, otherwise a call).~~
- ~~Situation 4: If prior chip(s) cover the call amount, adding any new chip(s) is a Rule 45 multiple chip bet. Ex: THE 50-100, BB posts one 1k chip. Pre-flop raise to 700 (600 more to BB). The 1k prior chip covers the raise, thus adding any new chip(s) is a Rule 45 bet of all chips. This applies whether or not the initial 1k posted is pulled back or left alone.~~
- ~~Situation 5: Regardless of the above, the gesture of combining and pushing or tossing all chips forward may be interpreted as intent to bet all chips under Rule 45.~~
### Rule 47: Re-opening the bet. 🟡
- Example 1. Multiple short all-in wagers that cumulatively equal a full raise and therefore re-open betting:
NLHE, Blinds 50-100. Post-flop, A opens betting for the 100 minimum.
B goes all in for a total of 125. C calls the 125,
D goes all in for 200 total and E calls 200.
Action returns to A who is facing a total raise of 100. Since 100 is a full raise, the betting is re-opened for A who can fold, call, or raise here. Note that neither Bs increment of 25 or Ds increment of 75 is by itself a full raise, but when added together they total a full raise and thus re-open the betting to “a player who is facing at least a full raise when the action returns”.
- Example 1-A: At the end of Example 1 above, A smooth calls the 200 total (another 100 to him). The bet is now on C who only faces a 75 increment. C called 125 previously and now faces 200 total (75 more). C must face at least 225 total to re-open betting. Because 75 is not a full raise, betting for C is not re-opened and C can either call with 75 more or fold, he cannot raise.
- Example 1-B: At the end of Example 1 above, A raises the minimum (100), and makes it 300 total to C. C already has called 125 so its an additional 175 for C to call. 175 is more than a full raise. Since C already acted and is “now facing at least a full raise”, the betting is re-opened to C who can fold, call, or re-raise here.
- Example 2: Multiple short all-ins, the min-raise is the last full valid bet or raise.
NLHE, Blinds 50-100. Post-flop A opens for 300, B pushes all-in for 500 total, C goes all-in for 650 total, D goes all-in for 800 total, E calls 800. What is the min raise for Player F? The opening bet (300) sets the initial min raise. Because no single player was all-in for more than 300, the min raise for F remains 300. F can either smooth call 800 or raise to at least 1100. See also Rule 43, Example 2 in Illustration Addendum.
- Example 3. Short all-in, 2 scenarios.
NLHE, Blinds 2000-4000. Pre-flop A calls the BB for 4000. B folds and C pushes all-in for 7500 total (an increment of 3500 above the 4000 BB). Its folded around to the SB who also folds.
- Example 3-A. Its 3500 more to the BB who has not yet acted on his option. The BB can fold, smooth call the 3500, or raise by at least 4000 for a total of 11,500. The BB smooth calls and its 3500 more to A. A has already acted and is facing 3500 which is not a full raise. Therefore, A can only fold or call the 3500, he cannot raise because it is not “at least a full bet when the action returns to him”.
- Example 3-B. The BB raises the minimum (4000), for a total of 11500. It is now 7500 to A and because 7500 is more than a full minimum raise, betting is now re-opened for A who can fold, call, or re-raise.
### Rule 51: Binding Declarations / Undercalls in Turn 🟡
- Example 1: NLHE, blinds 1000-2000. Post-flop, A opens for 2000, B raises to 8000, C pushes out 2000 silently. C has undercalled Bs bet. Per Rule 51-B, because B is not the opener (A is) and the round is still multi-way, at TDs discretion C may be required to make a full call or allowed to forfeit the 2000 undercall and fold.
- Example 2: NLHE, blinds 1000-2000. Post-flop 4 players remain. A opens for 8000, B silently puts out 2000. Per Rule 51-B, B undercalled the opening bet and must make a full call of 8000.
- Example 3: NLHE, blinds 1000-2000. Post-flop, A opens for 2000, B raises to 8000, C declares “call”. Per Rule 51-A, C has made a general verbal declaration (“call”) in turn. C is obligated to call Bs full bet of 8000.
- Example 4: NLHE, blinds 200-400. Opener bets 400, player A raises to 1200 and Player B puts out one 500 chip silently. Dealer tells B its 1200 and B folds. At TDs discretion B forfeits 400 and 100 is returned.
### Rule 52-B: Incorrect Bet Amounts, Pot-Limit Games 🟡
- Example 1: PLO, 500-1000 blinds. Post-flop the pot totals 10,500. Player A wants to bet the pot and asks the dealer for a count. Dealer replies “nine thousand five hundred”. A pushes out 9,500. Player B folds and Player C calls 9,500. Substantial action has occurred after the initial erroneous bet. The dealer then realizes As pot bet should have been 10,500. Because the quoted amount was less than the pot and substantial action has occurred, the 9,500 bet is binding and will not be increased to 10,500.
- Example 2: Same as example 1 above, Player B folds then the dealer realizes As pot bet should have been 10,500. Substantial action has not occurred, so A must increase his or her bet to 10,500 total.
- Example 3: PLO, 500-1000 blinds. Post-flop the pot totals 10,500. Player A wants to bet the pot and asks the dealer for a count. Dealer replies “eleven thousand five hundred”. A pushes out 11,500. Player B folds, Player C and D both call 11,500. Before burning and turning the next card, the dealer realizes the initial bet was an illegal overbet. Despite substantial action occurring, because the bet was illegal it will be reduced to 10,500 for all players calling anywhere on the current street. If the next card is dealt the error will stand.
### Rule 53-A: Action Out of Turn (OOT) 🟡
- Example 1: THE 50-100. Post flop Seat 3 opens for 300, Seat 4 folds, action is on Seat 5 when Seat 6 declares “raise to eight hundred”.
Step 1: Action backs up to the correct player in order (Seat 5) who is facing a bet of 300.
Step 2: If Seat 5 calls or folds then the action (a 300 bet) has not changed and Seat 6s OOT raise is binding (raise to 800). However, if Seat 5 raises, (say, to 600 total), then the action to Seat 6 has changed from a 300 bet to a 600 bet. If action changes, the 800 chips may be returned to Seat 6 who has all options open: call 600, re-raise to at least 900, or fold.
- Example 2: THE 50-100. Post flop Seat 3 checks, Seat 4 checks, action is on Seat 5 when Seat 6 declares “check”.
Step 1: Action backs up to the correct player in order (Seat 5) who is not facing a bet.
Step 2: If Seat 5 checks then the action (a check) has not changed and Seat 6s OOT check is binding. However, if Seat 5 bets, (say, 300), then the action to Seat 6 has changed from a check to a 300 bet. If action changes, then Seat 6 has all options open: call 300, raise to at least 600, or fold.
### Rule 53-B: Substantial Action Out of Turn (OOT). 🟡
A player skipped by OOT action must defend his right to act. If there is reasonable time and the skipped player has not spoken up by the time substantial action (see Rule 36) OOT occurs to his left, the OOT action is binding. The floor will be called to render a decision on how to treat the skipped hand.
- Example 1: NLHE, blinds 100-200. UTG (Seat 3) makes it 600. Seat 4 is skipped when Seat 5 calls 600 OOT. Seat 6 thinks for a moment then folds. There are now two players acting with chips involved to the left of Seat 4. Two players with chips qualifies as substantial action (Rule 36). Also, Seat 4 has had reasonable time to speak up and bring it to the dealers attention that he has been skipped. The OOT call by Seat 5 is now binding due to substantial action OOT, and the OOT fold by Seat 6 is binding (Rule 58). The floor is called to make a decision on the fate of Seat 4s hand.
- Example 2: NLHE, blinds 100-200. Four players remain to see the turn. After the dealer tables the turn card, the UTG (Seat 3) opens betting for 600. Seat 4 is skipped when Seat 5 checks and Seat 6 calls 600 OOT. The floor is called to make a decision on the fate of Seat 4s hand.
@@ -0,0 +1,940 @@
# Casono Game Engine
<!-- vim-markdown-toc GFM -->
* [Architecture Overview](#architecture-overview)
* [server/GameController](#servergamecontroller)
* [GameController](#gamecontroller)
* [addPlayer](#addplayer)
* [startGame](#startgame)
* [rotateDealer](#rotatedealer)
* [getDealer](#getdealer)
* [postBlinds](#postblinds)
* [dealHoleCards](#dealholecards)
* [dealFlop](#dealflop)
* [dealTurn](#dealturn)
* [dealRiver](#dealriver)
* [playerFold](#playerfold)
* [playerCall](#playercall)
* [playerRaise](#playerraise)
* [getState](#getstate)
* [getCommunityCards](#getcommunitycards)
* [determineWinner](#determinewinner)
* [server/action/AbstractAction](#serveractionabstractaction)
* [AbstractAction](#abstractaction)
* [server/action/AllInAction](#serveractionallinaction)
* [AllInAction](#allinaction)
* [server/action/BetAction](#serveractionbetaction)
* [BetAction](#betaction)
* [getAmount](#getamount)
* [server/action/BlindAction](#serveractionblindaction)
* [BlindAction](#blindaction)
* [getAmount](#getamount-1)
* [server/action/CallAction](#serveractioncallaction)
* [CallAction](#callaction)
* [server/action/FoldAction](#serveractionfoldaction)
* [FoldAction](#foldaction)
* [server/action/RaiseAction](#serveractionraiseaction)
* [RaiseAction](#raiseaction)
* [getAmount](#getamount-2)
* [server/deck/Card](#serverdeckcard)
* [Card](#card)
* [getSuit](#getsuit)
* [getRank](#getrank)
* [server/deck/Deck](#serverdeckdeck)
* [Deck](#deck)
* [shuffle](#shuffle)
* [draw](#draw)
* [setCards](#setcards)
* [server/engine/GameEngine](#serverenginegameengine)
* [GameEngine](#gameengine)
* [startNewHand](#startnewhand)
* [startNewHand](#startnewhand-1)
* [processAction](#processaction)
* [handleAction](#handleaction)
* [getState](#getstate-1)
* [server/engine/RoundManager](#serverengineroundmanager)
* [startNewHand](#startnewhand-2)
* [progressIfNeeded](#progressifneeded)
* [isBettingRoundFinished](#isbettingroundfinished)
* [advancePhase](#advancephase)
* [postBlinds](#postblinds-1)
* [server/engine/TurnManager](#serverengineturnmanager)
* [nextPlayer](#nextplayer)
* [server/evaluator/HandEvaluator](#serverevaluatorhandevaluator)
* [evaluate](#evaluate)
* [getSortedRanks](#getsortedranks)
* [getFlushCards](#getflushcards)
* [buildFlush](#buildflush)
* [checkStraightFlush](#checkstraightflush)
* [checkFourOfAKind](#checkfourofakind)
* [checkFullHouse](#checkfullhouse)
* [checkThreeOfAKind](#checkthreeofakind)
* [checkTwoPair](#checktwopair)
* [checkOnePair](#checkonepair)
* [getRank](#getrank-1)
* [isStraight](#isstraight)
* [server/evaluator/HandRank](#serverevaluatorhandrank)
* [HandRank](#handrank)
* [getType](#gettype)
* [getKickers](#getkickers)
* [server/player/Player](#serverplayerplayer)
* [Player](#player)
* [isAllIn](#isallin)
* [getId](#getid)
* [getName](#getname)
* [getChips](#getchips)
* [removeChips](#removechips)
* [addChips](#addchips)
* [setStatus](#setstatus)
* [getStatus](#getstatus)
* [getHand](#gethand)
* [giveCard](#givecard)
* [clearHand](#clearhand)
* [isFolded](#isfolded)
* [setFolded](#setfolded)
* [server/player/PlayerId](#serverplayerplayerid)
* [PlayerId](#playerid)
* [of](#of)
* [server/rules/RuleEngine](#serverrulesruleengine)
* [RuleEngine](#ruleengine)
* [validate](#validate)
* [server/rules/RuleViolationException](#serverrulesruleviolationexception)
* [RuleViolationException](#ruleviolationexception)
* [server/rules/showdown/CardsSpeakRule](#serverrulesshowdowncardsspeakrule)
* [determineWinner](#determinewinner-1)
* [awardPot](#awardpot)
* [server/state/GameState](#serverstategamestate)
* [getPlayers](#getplayers)
* [getCurrentPlayer](#getcurrentplayer)
* [getCurrentPlayerIndex](#getcurrentplayerindex)
* [isHandActive](#ishandactive)
* [getPhase](#getphase)
* [getTableState](#gettablestate)
* [getPot](#getpot)
* [getDeck](#getdeck)
* [getCommunityCards](#getcommunitycards-1)
* [getHoleCards](#getholecards)
* [getDealerIndex](#getdealerindex)
* [getPlayerCount](#getplayercount)
* [setCurrentPlayerIndex](#setcurrentplayerindex)
* [setHandActive](#sethandactive)
* [setPhase](#setphase)
* [setDealerIndex](#setdealerindex)
* [setDeck](#setdeck)
* [addPlayer](#addplayer-1)
* [getCurrentBet](#getcurrentbet)
* [setCurrentBet](#setcurrentbet)
* [resetBets](#resetbets)
* [addToPot](#addtopot)
* [isAllowOutOfTurn](#isallowoutofturn)
* [setAllowOutOfTurn](#setallowoutofturn)
* [getPlayer](#getplayer)
* [getCurrentBetCommitment](#getcurrentbetcommitment)
* [setCurrentBetCommitment](#setcurrentbetcommitment)
* [giveHoleCards](#giveholecards)
* [addCommunityCard](#addcommunitycard)
* [resetCommunityCards](#resetcommunitycards)
* [nextPlayer](#nextplayer-1)
* [rotateDealer](#rotatedealer-1)
* [getDealer](#getdealer-1)
* [startNewHand](#startnewhand-3)
* [foldPlayer](#foldplayer)
* [isFolded](#isfolded-1)
* [server/state/Pot](#serverstatepot)
* [add](#add)
* [getAmount](#getamount-3)
* [reset](#reset)
* [server/state/TableState](#serverstatetablestate)
* [getCurrentBet](#getcurrentbet-1)
* [setCurrentBet](#setcurrentbet-1)
* [getBigBlind](#getbigblind)
* [setBigBlind](#setbigblind)
* [getMinRaise](#getminraise)
* [setMinRaise](#setminraise)
* [isBettingOpen](#isbettingopen)
* [setBettingOpen](#setbettingopen)
* [canReopenBetting](#canreopenbetting)
* [setCanReopenBetting](#setcanreopenbetting)
* [getLastAggressorId](#getlastaggressorid)
* [setLastAggressorId](#setlastaggressorid)
<!-- vim-markdown-toc -->
## Architecture Overview
```txt
server/
└── domain/
└── game/
├── GameController.java
├── engine/
│ ├── GameEngine.java
│ ├── TurnManager.java
│ │ → 23: New Hand and New Limits 🟢
│ │ → 34: Button Placement and Movement 🟢
│ │
│ └── RoundManager.java
│ → 23: New Hand and New Limits 🟢
│ → 34: Button Placement and Movement 🟢
├── state/
│ ├── GameState.java
│ ├── GamePhase.java
│ ├── TableState.java
│ ├── BettingState.java
│ └── Pot.java
│ → 21: Side Pots 🟡
├── player/
│ ├── Player.java
│ └── PlayerStatus.java
├── deck/
│ ├── Deck.java
│ │ → Responsible for shuffling and distributing cards
│ │
│ ├── Card.java
│ │ → Definition of a playing card
│ │
│ ├── Rank.java
│ └── Suit.java
├── action/
│ ├── Action.java
│ ├── AbstractAction.java
│ ├── ActionType.java
│ │
│ ├── BlindAction.java
│ ├── BetAction.java
│ ├── CallAction.java
│ ├── RaiseAction.java
│ ├── FoldAction.java
│ └── AllInAction.java
├── rules/
│ ├── Rule.java
│ ├── RuleEngine.java
│ └── RuleViolationException.java
│ ├── betting/
│ │ ├── AcceptedActionRule.java
│ │ │ → 49: Accepted Action 🟢
│ │ │
│ │ ├── MinimumRaiseRule.java
│ │ │ → 43: Raise Amounts 🟢
│ │ │
│ │ ├── RaiseReopenRule.java
│ │ │ → 43: Raise Amounts 🟢
│ │ │ → 47: Re-Opening the Bet 🟡
│ │ │ → 48: Number of Allowable Raises 🟡
│ │ │
│ │ ├── MinimumBetRule.java
│ │ │ → 52: Incorrect Bets, Underbets and Underraises 🟡
│ │ │
│ │ ├── BindingDeclarationRule.java
│ │ │ → 51: Binding Declarations / Undercalls in Turn 🟡
│ │ │ → 56: String Bets and Raises 🟡
│ │ │
│ │ ├── AllInRule.java
│ │ │ → 16: Face Up for All-Ins 🟢
│ │ │ → 62: All-In with Chips Found Behind Later 🟡
│ │ │
│ │ ├── HandActiveRule.java
│ │ │ → Ensures only active players can act
│ │ │
│ │ ├── ActionOrderRule.java
│ │ │ → 50: Acting in Turn 🟢
│ │ │
│ │ └── OutOfTurnRule.java
│ │ → 53: Action Out of Turn (OOT) 🟡
│ │
│ └── showdown/
│ └── CardsSpeakRule.java
│ → 12: Declarations. Cards Speak at Showdown 🟢
├── evaluator/
│ ├── HandEvaluator.java
│ └── HandRank.java
└── exception/
└── RuleViolationException.java
```
## server/GameController
### GameController
- **Description**: GameController is responsible for managing the flow of the poker game. It
- **Parameter (`engine`)**: The GameEngine instance that manages the game state and logic.
### addPlayer
- **Description**: Adds a player to the game with the specified name and initial chip count.
- **Parameter (`name`)**: The name of the player to add.
- **Parameter (`chips`)**: The initial number of chips the player has.
### startGame
- **Description**: Initializes a new hand by preparing the deck, setting the phase to PREFLOP,
### rotateDealer
- **Description**: Rotates the dealer position to the next player in the list.
### getDealer
- **Description**: Returns the player currently acting as dealer.
### postBlinds
- **Description**: Determines the small and big blind players relative to the dealer
### dealHoleCards
- **Description**: Deals hole cards to each player from the deck.
### dealFlop
- **Description**: Draws three cards from the deck and adds them as community cards (flop).
### dealTurn
- **Description**: Deals the turn by drawing one community card from the deck and adding it to
### dealRiver
- **Description**: Deals the river by drawing one community card from the deck and adding it to
### playerFold
- **Description**: Processes a player's fold action by sending a FoldAction to the GameEngine.
- **Parameter (`playerId`)**: The ID of the player who is folding.
### playerCall
- **Description**: Processes a player's call action by sending a CallAction to the GameEngine.
- **Parameter (`playerId`)**: The ID of the player who is calling.
### playerRaise
- **Description**: Processes a player's raise action by sending a RaiseAction to the GameEngine.
- **Parameter (`playerId`)**: The ID of the player who is raising.
- **Parameter (`amount`)**: The amount the player is raising.
### getState
- **Description**: Retrieves the current game state from the GameEngine.
### getCommunityCards
- **Description**: Retrieves the list of community cards currently on the table.
### determineWinner
- **Description**: Retrieves the hole cards for each player in the game.
- **Return**: A map where the key is the player's name and the value is a list of Card objects representing the player's hole cards.
## server/action/AbstractAction
### AbstractAction
- **Description**: AbstractAction serves as a base class for all player actions in the poker
- **Parameter (`playerId`)**: The ID of the player performing the action.
## server/action/AllInAction
### AllInAction
- **Description**: AllInAction represents the action of a player going all-in in a poker game.
- **Parameter (`playerId`)**: The ID of the player performing the all-in action.
## server/action/BetAction
### BetAction
- **Description**: Represents a bet action where a player contributes a fixed amount of chips.
- **Parameter (`playerId`)**: The ID of the player performing the bet action.
- **Parameter (`amount`)**: The amount of chips the player is betting.
### getAmount
- **Description**: Retrieves the amount of chips being bet in this action.
## server/action/BlindAction
### BlindAction
- **Description**: Executes a blind by deducting chips from the player, adding them to the pot,
- **Parameter (`playerId`)**: The ID of the player posting the blind bet.
- **Parameter (`amount`)**: The amount of chips the player is posting as a blind bet.
### getAmount
- **Description**: Retrieves the type of this action, which is BLIND.
- **Parameter (`state`)**: The current game state on which to execute the action.
- **Return**: The ActionType corresponding to this action.
## server/action/CallAction
### CallAction
- **Description**: CallAction represents the action of a player calling in a poker game. When a
- **Parameter (`playerId`)**: the ID of the player performing the call action
## server/action/FoldAction
### FoldAction
- **Description**: FoldAction represents the action of a player folding in a poker game. When a
- **Parameter (`playerId`)**: The ID of the player performing the fold action.
## server/action/RaiseAction
### RaiseAction
- **Description**: Constructs a RaiseAction for the specified player ID and raise amount.
- **Parameter (`playerId`)**: The ID of the player performing the raise action.
- **Parameter (`raiseAmount`)**: The amount of chips the player is raising.
### getAmount
- **Description**: Retrieves the amount of chips being raised in this action.
## server/deck/Card
### Card
- **Description**: The Card class represents a single playing card in a standard deck of cards.
- **Parameter (`suit`)**: The suit of the card (Hearts, Diamonds, Clubs, Spades).
- **Parameter (`rank`)**: The rank of the card (2-10, Jack, Queen, King, Ace).
### getSuit
- **Description**: Retrieves the suit of the card.
### getRank
- **Description**: Retrieves the rank of the card.
## server/deck/Deck
### Deck
- **Description**: The Deck class represents a standard deck of playing cards. It provides
### shuffle
- **Description**: Shuffles the deck of cards using the Collections.shuffle method, which
### draw
- **Description**: Draws and removes the last card in the list, which represents the top of the deck.
### setCards
- **Description**: Retrieves the current list of cards in the deck. This method returns a new
## server/engine/GameEngine
### GameEngine
- **Description**: The GameEngine class is responsible for managing the core logic of the poker
- **Parameter (`state`)**: The initial game state to be managed by the engine.
- **Parameter (`ruleEngine`)**: The RuleEngine instance responsible for validating player actions.
- **Parameter (`roundManager`)**: The RoundManager instance responsible for managing the progression of rounds.
- **Parameter (`turnManager`)**: The TurnManager instance responsible for managing player turns.
### startNewHand
- **Description**: Starts a new hand with the provided game state. This method initializes the
- **Parameter (`state`)**: The game state to be used for starting the new hand.
### startNewHand
- **Description**: Starts a new hand using the current game state. This method is a convenience
### processAction
- **Description**: Processes a player action by validating it against the game rules, executing
- **Parameter (`action`)**: The player action to be processed.
### handleAction
- **Description**: Handles a player action by performing the following steps:
- **Parameter (`state`)**: The current game state on which to execute the action.
- **Parameter (`action`)**: The player action to be processed.
### getState
- **Description**: Retrieves the current game state managed by the GameEngine.
## server/engine/RoundManager
### startNewHand
- **Description**: RoundManager is responsible for managing the flow of a poker game round. It
- **Parameter (`state`)**: The game state to be used for starting the new hand.
### progressIfNeeded
- **Description**: Checks if the betting round is finished and advances the game phase if
- **Parameter (`state`)**: The current game state to be evaluated for betting round progression.
### isBettingRoundFinished
- **Description**: Determines if the betting round is finished by checking if all active players
- **Parameter (`state`)**: The current game state to be evaluated for betting round completion.
### advancePhase
- **Description**: Advances the game phase to the next stage (flop, turn, river, or showdown)
- **Parameter (`state`)**: The current game state to be updated with the new phase.
### postBlinds
- **Description**: Handles the posting of blinds at the start of a new hand. This method
- **Parameter (`state`)**: The current game state to be updated with the posted blinds.
## server/engine/TurnManager
### nextPlayer
- **Description**: The TurnManager class is responsible for managing the flow of turns in a
- **Parameter (`state`)**: The current game state that will be updated to reflect the next player's turn.
## server/evaluator/HandEvaluator
### evaluate
- **Description**: The HandEvaluator class provides functionality to evaluate a poker hand and
- **Parameter (`cards`)**: A list of Card objects representing the player's hand.
### getSortedRanks
- **Description**: Helper method to extract and sort the ranks of the cards in descending order.
- **Parameter (`cards`)**: A list of Card objects representing the player's hand.
### getFlushCards
- **Description**: Helper method to count the occurrences of each card rank in the hand.
- **Parameter (`ranks`)**: A list of integer ranks representing the cards in the hand.
- **Parameter (`cards`)**: A list of Card objects representing the player's hand.
- **Parameter (`suits`)**: A map where the key is the Suit and the value is a list of Cards belonging to that suit.
- **Return**: A map where the key is the card rank and the value is the count of occurrences.
### buildFlush
- **Description**: Helper method to build a HandRank object for a flush hand.
- **Parameter (`flushCards`)**: A list of Card objects that form a flush.
### checkStraightFlush
- **Description**: Helper method to check for a straight flush or royal flush in the hand.
- **Parameter (`flushCards`)**: A list of Card objects that form a flush.
### checkFourOfAKind
- **Description**: Helper method to check for a four of a kind hand rank.
- **Parameter (`rankCount`)**: A map where the key is the card rank and the value is the count of occurrences.
### checkFullHouse
- **Description**: Helper method to check for a full house hand rank.
- **Parameter (`rankCount`)**: A map where the key is the card rank and the value is the count of occurrences.
### checkThreeOfAKind
- **Description**: Helper method to check for a three of a kind hand rank.
- **Parameter (`rankCount`)**: A map where the key is the card rank and the value is the count of occurrences.
### checkTwoPair
- **Description**: Helper method to check for a two pair hand rank.
- **Parameter (`rankCount`)**: A map where the key is the card rank and the value is the count of occurrences.
### checkOnePair
- **Description**: Helper method to check for a one pair hand rank.
- **Parameter (`rankCount`)**: A map where the key is the card rank and the value is the count of occurrences.
### getRank
- **Description**: Helper method to get the rank of a card based on the count of occurrences in
- **Parameter (`map`)**: A map where the key is the card rank and the value is the count of occurrences.
- **Parameter (`count`)**: The specific count to look for (e.g., 2 for pairs, 3 for three of a kind).
### isStraight
- **Description**: Helper method to determine if a list of card ranks forms a straight.
- **Parameter (`ranks`)**: A list of integer ranks representing the cards in the hand.
## server/evaluator/HandRank
### HandRank
- **Description**: HandRank represents the rank of a poker hand, including its type (e.g.,
- **Parameter (`type`)**: The type of the hand (e.g., flush, straight).
- **Parameter (`kickers`)**: A list of integers representing the kickers for tie-breaking.
### getType
- **Description**: Retrieves the type of the hand.
### getKickers
- **Description**: Retrieves the list of kickers for tie-breaking.
## server/player/Player
### Player
- **Description**: The Player class represents a participant in the poker game. It holds
- **Parameter (`id`)**: The unique identifier for the player.
- **Parameter (`chips`)**: The initial number of chips the player has.
### isAllIn
- **Description**: Checks if the player is all-in, meaning they have no chips left to bet.
### getId
- **Description**: Retrieves the unique identifier of the player.
### getName
- **Description**: Returns the display name of the player.
### getChips
- **Description**: Retrieves the current chip count of the player.
### removeChips
- **Description**: Removes a specified amount of chips from the player's total. If the amount
- **Parameter (`amount`)**: The number of chips to remove from the player.
### addChips
- **Description**: Adds a specified amount of chips to the player's total.
- **Parameter (`amount`)**: The number of chips to add to the player.
### setStatus
- **Description**: Sets the player's status to the specified value.
- **Parameter (`status`)**: The new status for the player.
### getStatus
- **Description**: Retrieves the current status of the player.
### getHand
- **Description**: Retrieves the player's current hand of cards.
### giveCard
- **Description**: Adds a card to the player's hand.
- **Parameter (`card`)**: The Card object to be added to the player's hand.
### clearHand
- **Description**: Clears the player's hand of cards, removing all cards from the hand.
### isFolded
- **Description**: Checks if the player has folded in the current round.
### setFolded
- **Description**: Sets the player's folded status to the specified value.
- **Parameter (`folded`)**: The new folded status for the player.
## server/player/PlayerId
### PlayerId
- **Description**: PlayerId is a value object that represents the unique identifier of a player
### of
- **Description**: Constructs a PlayerId with the specified value. The constructor validates
- **Parameter (`value`)**: the string value representing the player's unique identifier
- **Parameter (`value`)**: the string value representing the player's unique identifier
## server/rules/RuleEngine
### RuleEngine
- **Description**: The RuleEngine class is responsible for managing and validating a list of
- **Parameter (`rules`)**: The list of rules to be managed by the RuleEngine.
### validate
- **Description**: Validates the given action against all the rules in the RuleEngine. If any
- **Parameter (`state`)**: The current state of the game.
- **Parameter (`action`)**: The action to be validated against the rules.
## server/rules/RuleViolationException
### RuleViolationException
- **Description**: RuleViolationException is a custom exception that is thrown when a player
- **Parameter (`message`)**: The detail message explaining the reason for the rule violation.
## server/rules/showdown/CardsSpeakRule
### determineWinner
- **Description**: The CardsSpeakRule class implements the Rule interface and defines the logic
- **Parameter (`state`)**: The current state of the game.
- **Parameter (`action`)**: The action to be validated.
- **Parameter (`state`)**: The current state of the game, which includes player information, hole cards, and community cards.
### awardPot
- **Description**: Awards the pot to the winner of the poker hand. It determines the winner(s)
- **Parameter (`state`)**: The current state of the game, which includes player information and pot details.
## server/state/GameState
### getPlayers
- **Description**: The GameState class encapsulates the entire state of a poker game at any
### getCurrentPlayer
- **Description**: Returns the current player whose turn it is to act.
### getCurrentPlayerIndex
- **Description**: Returns the index of the current player in the players list.
### isHandActive
- **Description**: Indicates whether a hand is currently active in the game.
### getPhase
- **Description**: Returns the current phase of the game (e.g., PREFLOP, FLOP, TURN, RIVER).
### getTableState
- **Description**: Returns the current state of the table, including player statuses and
### getPot
- **Description**: Returns the current pot, which contains the total amount of chips bet by
### getDeck
- **Description**: Returns the current deck of cards being used in the game.
### getCommunityCards
- **Description**: Returns the list of community cards currently on the table.
### getHoleCards
- **Description**: Returns the hole cards for a specific player based on their ID.
- **Parameter (`playerId`)**: The ID of the player whose hole cards are being requested.
### getDealerIndex
- **Description**: Returns the index of the dealer in the players list.
### getPlayerCount
- **Description**: Returns a map of player IDs to their current hole cards.
- **Return**: A map where the key is the player ID and the value is a list of Card objects representing the player's hole cards.
### setCurrentPlayerIndex
- **Description**: Sets the index of the current player in the players list.
- **Parameter (`index`)**: An integer representing the index of the current player.
### setHandActive
- **Description**: Sets whether a hand is currently active in the game.
- **Parameter (`handActive`)**: A boolean value indicating whether a hand is active.
### setPhase
- **Description**: Sets the current phase of the game.
- **Parameter (`phase`)**: The GamePhase enum value representing the new phase of the game.
### setDealerIndex
- **Description**: Sets the index of the dealer in the players list.
- **Parameter (`dealerIndex`)**: An integer representing the index of the dealer.
### setDeck
- **Description**: Sets the current deck of cards being used in the game.
- **Parameter (`deck`)**: A Deck object representing the new deck of cards to be used in the game.
### addPlayer
- **Description**: Adds a player to the game with the specified ID and initial chip count. This
- **Parameter (`id`)**: The ID of the player to add.
- **Parameter (`chips`)**: The initial number of chips the player has.
### getCurrentBet
- **Description**: Retrieves the current bet amount for a specific player based on their ID.
- **Parameter (`playerId`)**: The ID of the player whose current bet is being requested.
### setCurrentBet
- **Description**: Sets the current bet amount for a specific player based on their ID. This
- **Parameter (`playerId`)**: The ID of the player whose current bet is being set.
- **Parameter (`amount`)**: The new bet amount to be set for the specified player.
### resetBets
- **Description**: Resets the current bets for all players by clearing the currentBets map. This
### addToPot
- **Description**: Adds a specified amount to the pot. This method updates the total amount in
- **Parameter (`amount`)**: The amount of chips to be added to the pot.
### isAllowOutOfTurn
- **Description**: Returns whether out-of-turn actions are allowed in the game. Out-of-turn
### setAllowOutOfTurn
- **Description**: Sets whether out-of-turn actions are allowed in the game. This method updates
- **Parameter (`allowOutOfTurn`)**: A boolean value indicating whether out-of-turn actions should be allowed in the game.
### getPlayer
- **Description**: Retrieves a player from the game based on their ID. This method searches the
- **Parameter (`id`)**: The ID of the player to retrieve.
- **Return**: The Player object corresponding to the specified ID.
### getCurrentBetCommitment
- **Description**: Retrieves the current bet commitment for a specific player based on their ID.
- **Parameter (`playerId`)**: The ID of the player whose current bet commitment is being requested.
### setCurrentBetCommitment
- **Description**: Sets the current bet commitment for a specific player based on their ID. This
- **Parameter (`playerId`)**: The ID of the player whose current bet commitment is being set.
- **Parameter (`amount`)**: The new bet commitment amount to be set for the specified player.
### giveHoleCards
- **Description**: Gives hole cards to a specific player based on their ID. This method takes
- **Parameter (`playerId`)**: The ID of the player to whom the hole cards are being given.
- **Parameter (`c1`)**: The first Card object representing one of the player's hole cards.
- **Parameter (`c2`)**: The second Card object representing the other hole card for the player.
### addCommunityCard
- **Description**: Adds a community card to the game state. This method takes a Card object
- **Parameter (`card`)**: The Card object representing the community card to be added to the game state.
### resetCommunityCards
- **Description**: Resets the community cards by clearing the list of community cards. This
### nextPlayer
- **Description**: Advances the turn to the next player in the players list. This method updates
### rotateDealer
- **Description**: Rotates the dealer position to the next player in the players list. This
### getDealer
- **Description**: Retrieves the current dealer based on the dealerIndex. This method returns
### startNewHand
- **Description**: Starts a new hand by resetting the game state for the next round of poker.
### foldPlayer
- **Description**: Folds a player in the current hand. This method adds the specified player's ID
- **Parameter (`playerId`)**: The ID of the player who is folding.
### isFolded
- **Description**: Checks if a specific player has folded in the current hand. This method
- **Parameter (`playerId`)**: The ID of the player to check for folding status.
## server/state/Pot
### add
- **Description**: The Pot class represents the total amount of chips that players have bet in a
- **Parameter (`chips`)**: The number of chips to add to the pot.
### getAmount
- **Description**: Retrieves the current amount of chips in the pot.
### reset
- **Description**: Resets the pot to zero, typically used at the end of a round or when
## server/state/TableState
### getCurrentBet
- **Description**: The TableState class represents the current state of the poker table during a
### setCurrentBet
- **Description**: Sets the current bet amount for the table. This method is typically called
- **Parameter (`currentBet`)**: The new current bet amount to set for the table.
### getBigBlind
- **Description**: Returns the big blind amount. The big blind serves as a baseline
### setBigBlind
- **Description**: Sets the big blind amount for the game. The big blind is a forced bet that
- **Parameter (`bigBlind`)**: The amount to set as the big blind for the game.
### getMinRaise
- **Description**: Retrieves the minimum raise amount for the current betting round. The
### setMinRaise
- **Description**: Sets the minimum raise amount for the current betting round. This method is
- **Parameter (`minRaise`)**: The new minimum raise amount to set for the current betting round.
### isBettingOpen
- **Description**: Checks if betting is currently open at the table. This status indicates
### setBettingOpen
- **Description**: Sets the betting status for the table. This method can be used to open or
- **Parameter (`bettingOpen`)**: The new betting status to set for the table (true for open, false for closed).
### canReopenBetting
- **Description**: Checks if betting can be reopened after being closed. This status allows for
### setCanReopenBetting
- **Description**: Sets whether betting can be reopened after being closed. This method is
- **Parameter (`canReopenBetting`)**: The new status indicating whether betting can be reopened (true or false).
### getLastAggressorId
- **Description**: Retrieves the ID of the last aggressor in the current betting round. The
### setLastAggressorId
- **Description**: Sets the ID of the last aggressor in the current betting round. This method
- **Parameter (`lastAggressorId`)**: The new ID of the last aggressor to set for the current betting round.
@@ -0,0 +1,200 @@
# Game Engine Control
<!-- vim-markdown-toc GFM -->
* [GameController](#gamecontroller)
* [How the Server interacts with the GameController](#how-the-server-interacts-with-the-gamecontroller)
* [Starting a Game](#starting-a-game)
* [Preflop Actions](#preflop-actions)
* [Flop](#flop)
* [Turn](#turn)
* [River](#river)
* [Showdown](#showdown)
* [Server Outputs](#server-outputs)
* [Get full game state](#get-full-game-state)
* [Get community cards](#get-community-cards)
* [Get player hole cards](#get-player-hole-cards)
<!-- vim-markdown-toc -->
# GameController
The GameController acts as the main entry point for controlling the poker game logic from the server.
The server does not manipulate the game state directly.
Instead, it interacts exclusively with the `GameController`, which internally coordinates:
- the GameEngine
- the GameState
- the RuleEngine
- the RoundManager
- the TurnManager
# How the Server interacts with the GameController
The server calls methods on the GameController to control the game.
## Starting a Game
```java
GameController game = new GameController(engine);
game.addPlayer(PlayerId.of("Julian"), 20000);
game.addPlayer(PlayerId.of("Mathis"), 20000);
game.addPlayer(PlayerId.of("Jona"), 20000);
game.addPlayer(PlayerId.of("Lars"), 20000);
game.startGame();
```
Steps performed:
1. Create a GameController instance.
2. Add players with their starting chip stacks.
3. Start the game.
When `startGame()` is called:
- the deck is prepared
- hole cards are dealt
- the game phase switches to PREFLOP
## Preflop Actions
During the preflop phase, players perform actions.
```java
game.playerCall(PlayerId.of("Julian"));
game.playerFold(PlayerId.of("Mathis"));
game.playerCall(PlayerId.of("Jona"));
game.playerRaise(PlayerId.of("Lars"), 1200);
```
Supported actions include:
* `playerCall(playerId)`
* `playerFold(playerId)`
* `playerRaise(playerId, amount)`
The GameController passes these actions on to the GameEngine, which validates them using the RuleEngine.
## Flop
Once the preflop betting round is completed, the server can deal the flop.
```java
game.dealFlop();
```
This will:
- draw 3 community cards
- add them to the board
- update the game phase
## Turn
```java
game.dealTurn();
```
This deals the fourth community card.
## River
```java
game.dealRiver();
```
This deals the fifth and final community card and starts the final betting round.
## Showdown
After the final betting round, the server can determine the winner.
```java
String winner = game.showdown();
````
This will:
- evaluate the hands of all remaining players
- determine the best poker hand
- award the pot to the winner
- end the current hand
Example:
```text
Winner: Julian
Pot: 3200
```
During the showdown, each remaining player's hand is evaluated using their:
- two hole cards
- five community cards
The best possible 5-card poker hand wins the pot.
# Server Outputs
The server can query the current game state at any time.
## Get full game state
```java
GameState state = game.getState();
````
Returns the complete game state.
The state includes information such as:
- players
- chip stacks
- pot
- current game phase
- deck state
## Get community cards
```java
List<Card> board = game.getCommunityCards();
```
Returns the community cards currently on the board.
The number of cards depends on the game phase:
- Flop -> 3 cards
- Turn -> 4 cards
- River -> 5 cards
Example:
```text
[NINE of DIAMONDS, TEN of SPADES, JACK of CLUBS]
```
## Get player hole cards
```java
Map<PlayerId, List<Card>> cards = game.getPlayerCards();
```
Returns a mapping of player IDs to their hole cards.
Each player receives two private cards at the start of the hand.
```text
playerId -> [Card, Card]
```
Example:
```text
Mathis -> [NINE of DIAMONDS, TEN of SPADES]
Lars -> [JACK of SPADES, TWO of HEARTS]
Jona -> [SEVEN of DIAMONDS, TWO of DIAMONDS]
Julian -> [NINE of HEARTS, FIVE of DIAMONDS]
```
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 958 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 KiB

+555
View File
@@ -0,0 +1,555 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Markdown Viewer</title>
<script src="casono-markdown-render-engine.js"></script>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #0d9e3b;
color: #ffffff;
}
body::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
}
#content {
padding: 40px;
max-width: 900px;
margin: auto;
}
h1, h2, h3 {
color: #ffffff;
text-shadow: 2px 2px 0 #000;
}
p, li {
color: #ffffff;
font-size: 16px;
}
a {
color: gold;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
code {
background: rgba(0,0,0,0.4);
padding: 2px 6px;
border-radius: 5px;
}
hr {
border: 1px solid #5c3d10;
}
.cm-toc {
margin-bottom: 25px;
}
.cm-toc-title {
font-weight: bold;
margin-bottom: 8px;
}
.cm-toc-item {
margin: 3px 0;
}
.cm-toc-item a {
color: black;
text-decoration: none;
}
.cm-toc-item a:hover {
text-decoration: underline;
}
.level-2 { margin-left: 12px; opacity: 0.95; }
.level-3 { margin-left: 24px; opacity: 0.85; }
.cm-h1 {
font-size: 28px;
margin-top: 20px;
text-shadow: 2px 2px 0 #000;
}
.cm-h2 {
font-size: 22px;
margin-top: 18px;
}
.cm-h3 {
font-size: 18px;
margin-top: 14px;
}
.cm-img {
max-width: 600px;
width: 100%;
display: block;
margin: 10px 0;
border-radius: 6px;
}
/* CODE */
.cm-code {
background: rgba(0,0,0,0.35);
padding: 10px;
border-radius: 6px;
overflow-x: auto;
}
.cm-inline {
background: rgba(0,0,0,0.4);
padding: 2px 5px;
border-radius: 4px;
}
</style>
</head>
<body>
<div id="content"></div>
<script>
window.addEventListener("DOMContentLoaded", () => {
const markdown = `
# Start Game
Es wird Java 25 benötigt
## Server starten
\`\`\`bash
java -jar casono.jar server <listenport>
\`\`\`
## Client starten
\`\`\`bash
java -jar casono.jar client <serverip>:<serverport> [username]
\`\`\`
Die Parameter serverip, serverport, listenport und username müssen ersetzt werden
# UI
## Lobby UI
### Eine Lobby erstellen
![Create a Lobby](./images/create-a-lobby.png)
### Einer Lobby beitreten
![Join a Lobby](./images/join-a-lobby.png)
### Den Username ändern
![Change Username](./images/change-username.png)
### Highscores
![View Highscores](./images/view-high-scores.png)
## Game UI
![Game UI](./images/game-ui.png)
![Taskbar](./images/taskbar.png)
## Themes
![Set the theme](./images/game_ui_normal_theme.png)
### Black-and-White Theme
![Black and White Theme](./images/game_ui_black_white_theme.png)
### Glass-Effect Theme
![Glass Effect Theme](./images/game_ui_glass_theme.png)
## Casono Browser
![[casono-browser.png]]
![Casono Browser](./images/casono-browser.png)
## Chat UI
### Globaler Chat
![Globaler Chat](./images/global_chat.png)
### Lobby Chat
![Lobby Chat](./images/lobby_chat.png)
### Whisper Chat
![Whisper Chat](./images/whisper_chat.png)
# Casono Rules
## 1. Spielübersicht
Texas Holdem ist ein strategisches Kartenspiel für mehrere Spieler.
Ziel ist es, den Pot (alle gesetzten Chips) zu gewinnen, entweder durch:
- die beste Kartenkombination am Ende der Runde
- oder indem alle anderen Spieler vorher aussteigen (Fold)
### Grundregeln
- Jeder Spieler erhält 2 verdeckte Karten (Hole Cards)
- Es werden 5 Gemeinschaftskarten offen in der Mitte ausgelegt
- Jeder Spieler bildet die beste 5-Karten-Kombination aus:
- eigenen Karten
- und Gemeinschaftskarten
- Zu Spielbeginn erhält jeder Spieler ein Startgeld von 20000 Chips ($)
## 2. Sitzposition & Dealer-Button
Der sogenannte Dealer-Button bestimmt die Positionen am Tisch:
- Er zeigt an, wer als „Geber“ (Dealer) fungiert
- Die Positionen rotieren im Uhrzeigersinn nach jeder Runde
Die Position ist entscheidend, da sie bestimmt:
- die Reihenfolge der Aktionen
- wer die Blinds setzen muss
## 3. Blinds (Pflichteinsätze)
Vor jeder Runde werden zwei verpflichtende Einsätze geleistet:
- **Small Blind** (kleiner Blind): 100 Chips gesetzt vom Spieler links neben dem Dealer
- **Big Blind** (großer Blind): 200 Chips - gesetzt vom Spieler zwei Plätze links vom Dealer
Diese Einsätze sorgen dafür, dass:
- ein Startpot entsteht
- jede Runde aktiv gespielt wird
## 4. Spielablauf im Detail
### 4.1 Preflop (erste Setzrunde)
Nach dem Austeilen der Karten beginnt die erste Setzrunde.
Der Spieler links vom Big Blind eröffnet die Runde.
Jeder Spieler hat folgende Optionen:
- **Fold** Karten ablegen und aussteigen
- **Call** Einsatz mitgehen
- **Raise** Einsatz erhöhen
### 4.2 Flop (3 Gemeinschaftskarten)
- Drei Karten werden offen auf den Tisch gelegt
- Eine neue Setzrunde beginnt
- Die Setzrunde beginnt jetzt immer beim ersten aktiven Spieler links vom Dealer (im Uhrzeigersinn).
- Der erste Spieler bei der Flop Runde muss keinen höheren Einsatz setzen als der letzte Spieler aus der Preflop Runde, allerdings muss er seinen eigenen Einsatz aus der Preflop Runde überbieten.
Ab diesem Zeitpunkt können alle Spieler ihre Strategie anhand zusätzlicher Informationen anpassen.
### 4.3 Turn (4. Gemeinschaftskarte)
- Die vierte Karte wird aufgedeckt
- Eine weitere Setzrunde folgt
Die Einsätze werden oft höher, da sich stärkere Hände entwickeln.
### 4.4 River (5. Gemeinschaftskarte)
- Die letzte Karte wird aufgedeckt
- Letzte Setzrunde
Dies ist die finale Entscheidungsphase:
- Maximierung des Gewinns
- oder Minimierung von Verlusten
## 5. Showdown (Kartenvergleich)
Wenn nach der letzten Setzrunde mindestens zwei Spieler verbleiben:
- Alle verbleibenden Spieler decken ihre Karten auf
- Die **beste 5-Karten-Kombination gewinnt**
Wichtig:
- Die Karten „sprechen für sich“ die beste Hand zählt unabhängig von Ansagen
## 6. Poker-Handrangfolge
Die Stärke der Hände ist eindeutig festgelegt (von schwach nach stark):
1. High Card (höchste Einzelkarte)
2. One Pair (ein Paar)
3. Two Pair (zwei Paare)
4. Three of a Kind (Drilling)
5. Straight (Straße)
6. Flush (Farbe)
7. Full House
8. Four of a Kind (Vierling)
9. Straight Flush
10. Royal Flush
Je höher die Kombination, desto stärker die Hand.
## 7. Wichtige Grundprinzipien
### Reihenfolge beachten
Spieler müssen immer der Reihe nach handeln.
### Klare Aktionen
Alle Aktionen müssen eindeutig sein:
- Einsätze klar ansagen oder eindeutig setzen
### Ein Spieler eine Hand
- Spieler dürfen ihre Karten nicht teilen oder gemeinsam spielen
### Fehlerhafte Einsätze
- Unklare oder falsche Einsätze können korrigiert werden, abhängig von der Spielsituation (nur wenn der Einsatz
außerhalb der gültigen Grenzen liegt; zu hohe oder unzulässige Beträge werden blockiert und nicht automatisch
korrigiert)
## 8. Strategische Einordnung
Texas Holdem ist kein reines Glücksspiel. Der Erfolg basiert auf:
- Wahrscheinlichkeiten (Mathematik)
- Einschätzung von Gegnern (Psychologie)
- Positionsspiel und Timing
# Casono Rules Easy Description
Der Pokertisch ist ein unglaublich faszinierender Erlebnisraum, in dem man sehr viel lernen kann: über sich selbst, über
andere Menschen und über Fragen wie: Wie treffe ich eigentlich Entscheidungen, wie gehe ich mit Stress und Unsicherheit
um und wie gut ich darin bin, mich in andere hineinzuversetzen und Situationen richtig einzuschätzen.
Damit Du in diesem Erlebnisraum starten kannst, ist es wie bei jedem Spiel notwendig, zuerst die Grundregeln und den
Spielablauf zu verstehen.
Also los geht es:
Wir haben am Tisch **4 Spieler**: Julian, Mathis, Jona und Lars. Jeder Spieler startet mit **20000 Chips ($)**. Jeder
bekommt **2 Karten auf die Hand** und es gibt zusätzlich **5 Gemeinschaftskarten**, die später in der Mitte aufgedeckt
werden.
![1. image](./images/1-1.svg)
Die Spieler sitzen in folgender Reihenfolge: Julian, Mathis, Jona und Lars. Einer davon hat den Dealer-Button, der
bestimmt, wer die Karten austeilt und von wo die Runde beginnt. Dieser Button wandert nach jeder Runde im Uhrzeigersinn
weiter und verändert damit die Position ständig.
Regel: *34 Button Placement and Movement 🟢*
## Blinds (Small Blind & Big Blind)
Bevor die Karten verteilt werden, gibt es zwei Pflicht-Einsätze:
Der Small Blind und der Big Blind. Der Big Blind ist immer doppelt so hoch wie der Small Blind.
![2. image](./images/2-1.svg)
Regel: *32 Dead Button 🟡*
Diese Einsätze sorgen dafür, dass sofort ein Pot entsteht und das Spiel überhaupt beginnt, weil jeder schon “im Spiel”
ist.
Danach werden die Karten verteilt: zuerst Small Blind, dann Big Blind und dann im Uhrzeigersinn alle anderen Spieler.
## Erste Setzrunde (Preflop)
Die erste Setzrunde beginnt immer bei dem Spieler links vom Big Blind.
Jetzt muss jeder Spieler entscheiden:
* Fold (aussteigen)
* Call (mitgehen)
* Raise (erhöhen)
Regel: *40 Methods of Betting 🟢*
Regel: *41 Methods of Calling 🟢*
Regel: *42 Methods of Raising 🟢*
Regel: *50 Acting in Turn 🟢*
## Beispiel Preflop
Julian schaut seine Karten an und entscheidet sich direkt für einen Raise von **600 Chips**.
![3. image](./images/3-1.svg)
Mathis sieht seine Karten an und merkt, dass sie nicht gut sind, also foldet er und steigt aus.
![4. image](./images/4-1.svg)
Jona ist nun dran und entscheidet sich ebenfalls für einen Call, weil seine Hand spielbar ist.
![5. image](./images/5-1.svg)
Lars schaut seine Karten an, erkennt eine starke Hand und erhöht auf **1200 Chips**.
![6. image](./images/6-1.svg)
Damit verändert sich sofort die Situation: Julian und Jona müssen entscheiden, ob sie diesen Raise bezahlen, selbst
erhöhen oder aussteigen.
## Flop (3 Gemeinschaftskarten)
Jetzt werden **3 Gemeinschaftskarten** in die Mitte gelegt. Ab hier verändert sich das Spiel komplett, weil alle Spieler
zusätzliche Informationen bekommen.
Die Setzrunde beginnt jetzt immer beim ersten aktiven Spieler links vom Dealer (im Uhrzeigersinn).
![7. image](./images/7-1.svg)
Es beginnt eine neue Setzrunde.
Regel: *49 Accepted Action 🟢*
## Beispiel Flop
Jona setzt **1000 Chips** als Erstes. Lars entscheidet sich mitzugehen (Call), weil seine Karten durch die
Gemeinschaftskarten stärker geworden sind.
Julian steigt aus, weil er keine gute Verbindung mehr sieht. Mathis ist bereits raus.
![8. image](./images/8-1.svg)
## Turn (4. Karte)
Jetzt kommt die **4. Gemeinschaftskarte**.
Wieder beginnt eine neue Setzrunde.
Jona setzt diesmal **3000 Chips**. Lars bezahlt erneut (Call), weil seine Hand weiterhin gut spielbar ist.
![9. image](./images/9-1.svg)
Regel: *53 Action Out of Turn 🟡*
## River (5. Karte)
Jetzt wird die letzte Gemeinschaftskarte aufgedeckt.
Dies ist die letzte Entscheidung im Spiel.
Jona setzt **5000 Chips**.
![10. image](./images/10-1.svg)
Lars muss jetzt entscheiden: Fold, Call oder Raise auf 10000 Chips.
Regel: *54 Pot Size Bets 🟡*
## Showdown (Gewinnentscheidung)
Wenn nach der letzten Setzrunde noch zwei Spieler übrig sind, kommt es zum Showdown.
Beide Spieler zeigen ihre Karten offen. Gewonnen hat die **beste 5-Karten-Kombination aus Handkarten und
Gemeinschaftskarten**.
![11. image](./images/11-1.svg)
Regel: *12 Cards Speak at Showdown 🟢*
Regel: *16 Face Up for All-Ins 🟢*
Regel: *17 Non All-In Showdowns 🟢*
Wenn Lars den letzten Einsatz bezahlt, werden die Hände verglichen. Wenn er foldet, gewinnt Jona automatisch den
gesamten Pot.
## Poker Hand Rankings (Gewichtung)
Die Kartenkombinationen sind klar geordnet von schwach bis extrem stark:
<img src="./images/12.png" height="600">
Je höher die Kombination, desto stärker die Hand und desto wahrscheinlicher der Gewinn.
Jona: 2. Paar:
![13. image](./images/13-1.svg)
Lars: 1. Paar:
![14. image](./images/14-1.svg)
Da zwei Paare in der Rangfolge über einem einzelnen Paar stehen, gewinnt Jona diese Runde.
## Fazit
Poker ist kein Glücksspiel im klassischen Sinn, sondern ein Spiel aus Strategie, Psychologie und Mathematik. Jede
Entscheidung von Julian, Mathis, Jona oder Lars verändert die komplette Dynamik am Tisch. Wer die Regeln versteht,
versteht nicht nur Karten, sondern auch Menschen und Entscheidungen unter Druck.
Regel: *67 One Player One Hand 🟢*
Regel: *52 Incorrect Bets 🟡*
Regel: *57 Non-Standard Betting 🟡*
`;
document.getElementById("content").innerHTML =
marked.parse(markdown);
document.querySelectorAll("#content a").forEach(link => {
link.addEventListener("click", (e) => {
const href = link.getAttribute("href");
if (href && href.endsWith(".md")) {
e.preventDefault();
alert("You cannot load an external MD file using `file:///` without a server.");
}
});
});
});
</script>
<noscript>
<div style="
padding: 40px;
font-family: Arial, sans-serif;
background-color: #0d9e3b;
color: #ffffff;
text-align: center;
">
<h2>JavaScript is disabled</h2>
<p>
The Casono Browser requires JavaScript for the <br>
Casono Markdown Render Engine to display content correctly.<br><br>
For security, JavaScript is disabled by default in the Casono Browser and should only be enabled when needed.
</p>
<p>
Please enable JavaScript in your Browser settings and reload the page.
</p>
<img src="images/activate-js.png" alt="JavaScript aktivieren Anleitung" style="max-width: 100%; margin-top: 20px; border-radius: 10px;">
</div>
</noscript>
</body>
</html>
@@ -0,0 +1,249 @@
# Client Nework Architecture
<!-- vim-markdown-toc GFM -->
* [Architecture Overview](#architecture-overview)
* [network/Card.java](#networkcardjava)
* [network/GameState.java](#networkgamestatejava)
* [network/Player.java](#networkplayerjava)
* [network/ChatClient.java](#networkchatclientjava)
* [ChatClient(ClientService clientService)](#chatclientclientservice-clientservice)
* [sendMessage(Message message)](#sendmessagemessage-message)
* [getMessages()](#getmessages)
* [network/ClientService.java](#networkclientservicejava)
* [ClientService(String ip, int port)](#clientservicestring-ip-int-port)
* [processCommand(String message)](#processcommandstring-message)
* [sendRequest(Runnable request)](#sendrequestrunnable-request)
* [getRuntimeException(Exception e)](#getruntimeexceptionexception-e)
* [closeSocket()](#closesocket)
* [writeToTransport(String s) throws IOException](#writetotransportstring-s-throws-ioexception)
* [network/CoreClient.java](#networkcoreclientjava)
* [CoreClient(ClientService clientservice)](#coreclientclientservice-clientservice)
* [ping()](#ping)
* [login(String user)](#loginstring-user)
* [network/GameClient.java](#networkgameclientjava)
* [GameClient(ClientService client)](#gameclientclientservice-client)
* [getGameState()](#getgamestate)
* [parseGameState(String input)](#parsegamestatestring-input)
* [Example server response](#example-server-response)
* [network/LobbyClient.java](#networklobbyclientjava)
* [LobbyClient(ClientService client)](#lobbyclientclientservice-client)
* [fetchLobbyStatusString(int lobbyId)](#fetchlobbystatusstringint-lobbyid)
* [createLobby()](#createlobby)
* [getLobbyId()](#getlobbyid)
* [joinLobby(int lobbyId)](#joinlobbyint-lobbyid)
<!-- vim-markdown-toc -->
## Architecture Overview
```text
client/
├── game/
│ ├── Card.java
│ ├── GameState.java
│ └── Player.java
└── network/
├── ChatClient.java
├── ClientService.java
├── CoreClient.java
├── GameClient.java
└── LobbyClient.java
```
### game/Card.java
Represents a playing card with a value and suit.
### game/GameState.java
Represents the current state of the poker game, including the phase, pot size, current bet, dealer position, active player, community cards, and player information.
### game/Player.java
Represents a player in the poker game, including their name, chip count, current bet, state (e.g., `active`, `folded`), and their hole cards.
### network/ChatClient.java
The ChatClient class is responsible for sending messages to the server and retrieving messages from the server. It uses the ClientService to send commands and receive responses from the server.
#### ChatClient(ClientService clientService)
Constructs a ChatClient with the given ClientService for communication.
- **Parameter (`clientService`)**: The ClientService instance used to send commands and receive responses from the server.
#### sendMessage(Message message)
Send a Message to the server by converting it to a string format and sending a `SEND_MESSAGE` command with the message content as arguments.
- **Parameter (`message`)**: message The Message object to be sent to the server.
#### getMessages()
Retrieve messages from the server by first sending a `GET_MESSAGE_COUNT` command to determine how many messages are available and then sending `GET_NEXT_MESSAGE` commands in a loop to retrieve each message. The retrieved messages are parsed into Message objects and returned as a list.
- **Parameter (`A`)**: list of Message objects representing the messages retrieved from the server.
### network/ClientService.java
The ClientService class is responsible for managing the connection to the server, sending commands, and receiving responses. It uses a TcpTransport to
communicate with the server and an ExecutorService to handle asynchronous requests.
#### ClientService(String ip, int port)
Constructs a ClientService with the given server IP and port. It establishes a socket connection to the server and initializes the TcpTransport and ExecutorService for communication.
- **Parameter (`ip`)**: The IP address of the server to connect to.
- **Parameter (`port`)**: The port number of the server to connect to.
#### processCommand(String message)
Sends a command to the server and waits for the response. The command is sent using the TcpTransport, and the response is read in a loop until a valid response is received. The method handles `+OK` and `-ERROR` responses from the server and returns the actual response content.
- **Parameter (`message`)**: The command message to be sent to the server.
- **Return**: The response from the server as a string.
#### sendRequest(Runnable request)
Helper method to send a request to the server using the ExecutorService. It submits the request as a Runnable task and waits for its completion. If the task is interrupted or encounters an execution exception, it throws a
RuntimeException with the appropriate cause.
- **Parameter (`request`)**: The Runnable task representing the request to be sent to the server.
#### getRuntimeException(Exception e)
Helper method to extract the cause of an exception and return it as a RuntimeException. If the cause is null, it returns the original exception as a RuntimeException. If the cause is already a RuntimeException, it returns it directly. Otherwise, it wraps the cause in a new RuntimeException and returns it.
- **Parameter (`e`)**: The exception from which to extract the cause.
- **Return**: A RuntimeException representing the cause of the original exception.
#### closeSocket()
Closes the socket connection to the server and shuts down the ExecutorService. It also closes the TcpTransport used for communication. If any IOException occurs during this process, it prints the exception to the console.
#### writeToTransport(String s) throws IOException
Helper method to write a command string to the TcpTransport. It generates a unique ID for the command using the idGenerator and sends a RawPacket containing the ID and the command string to the server. If an IOException occurs during this process, it throws a RuntimeException with the cause.
- **Parameter (`s`)**: The command string to be sent to the server.
- **Throws IOException**: If an I/O error occurs while writing to the transport.
### network/CoreClient.java
The CoreClient class provides basic functionalities for communicating with the server, such as sending a ping command to check connectivity and logging in with a username. It uses the ClientService to send commands and receive responses from the server.
#### CoreClient(ClientService clientservice)
Constructs a CoreClient with the given ClientService for communication.
- **Parameter (`clientservice`)**: The ClientService instance used to send commands and receive responses from the server.
#### ping()
Sends a `PING` command to the server to check connectivity. The server should respond with a `PONG` message if the connection is successful.
#### login(String user)
Logs in to the server with the given username by sending a `LOGIN` command.
- **Parameter (`user`)**: The username to log in with.
### network/GameClient.java
The GameClient class is responsible for communicating with the server to retrieve the current game state. It sends a command to the server and parses the response into a structured GameState object.
#### GameClient(ClientService client)
Constructs a GameClient with the given ClientService for communication.
- **Parameter (`client`)**: The ClientService instance used to send commands and receive responses from the server.
#### getGameState()
Retrieves the current game state from the server by sending a command and parsing the response.
- **Return**: A GameState object representing the current state of the game.
#### parseGameState(String input)
Parses the raw response from the server into a structured GameState object.
- **Parameter (`input`)**: The raw response string from the server.
- **Return**: A GameState object representing the current state of the game.
#### Example server response
```text
+OK
PHASE=FLO P
POT=150
CURRENT_BET=50
DEALER=0
ACTIVE_PLAYER=1
CARDS
CARD
VALUE=10
SUIT=H
CARD
VALUE=7
SUIT=S
CARD
VALUE=A
SUIT=D
PLAYERS
PLAYER
NAME=Max
CHIPS=1200
BET=50
STATE=ACTIVE
CARDS
CARD
VALUE=K
SUIT=H
CARD
VALUE=3
SUIT=C
PLAYER
NAME=Anna
CHIPS=800
BET=0
STATE=FOLDED
CARDS
END
```
### network/LobbyClient.java
The LobbyClient class is responsible for communicating with the server to manage game lobbies. It provides methods to create a lobby, join a lobby, and fetch the current status of a lobby by sending appropriate commands to the server and processing the responses.
#### LobbyClient(ClientService client)
Constructs a LobbyClient with the given ClientService for communication.
- **Parameter (`client`)**: The ClientService instance used to send commands and receive responses from the server.
#### fetchLobbyStatusString(int lobbyId)
Fetch the current status of the lobby with the given id from the server.
- **Parameter (`lobbyId`)**: The id of the lobby to fetch the status for.
- **Return**: A string representing the current status of the lobby, as returned by the server.
#### createLobby()
Request the server to create a new lobby and return the id of the newly created lobby.
- **Return**: The id of the newly created lobby, as returned by the server.
#### getLobbyId()
Request the server to return the id of the lobby that the client is currently in.
- **Return**: The id of the lobby that the client is currently in, as returned by the server.
#### joinLobby(int lobbyId)
Request the server to join the lobby with the given id.
- **Parameter (`lobbyId`)**: The id of the lobby to join.
@@ -0,0 +1,35 @@
# Commands
Commands are the primary extension point of the server.
Every client-facing operation e.g. checking a username, sending a chat message, joining a lobby is implemented as a command.
Each command consists of four classes: a **Parser**, a **Request**, a **Handler**, and a **Response**.
The infrastructure for routing and dispatching commands lives in the `network/` layer and is intentionally kept generic.
The concrete implementations for each command live in `app/commands/` and are wired together at startup in `ServerApp`.
![Overview of all components directly related to executing requests](../../../images/docs/networking/commands/overview.png)
## Contents
### Guides
- [Implementing a Command](./guide-on-implementing-a-command.md) -
Step-by-step walkthrough for adding a new command to the server, including registration and common pitfalls.
### Reference
- [Command Infrastructure](./commands-deep-dive.md) -
Technical deep-dive into the `CommandParser`, `CommandParserDispatcher`, `CommandHandler`, `CommandRouter`, `Request`, and the response hierarchy.
### Protocol document
- [Protocol Document](./protocol-document.md) -
List of all supported commands by the server, along with descriptions, required pre-execution checks, and an example for both request and response.
## Key Concepts
**Each command is self-contained.**
A command's Parser, Request, Handler, and Response all live in the same package under `app/commands/<name>/`.
This keeps related code co-located and makes it easy to reason about a single command without navigating across multiple directories.
**The `network/` layer knows nothing about specific commands.**
`CommandParser` and `CommandHandler` are generic interfaces. The `CommandParserDispatcher` and `CommandRouter` operate on those interfaces.
Adding a new command **never** requires modifying infrastructure code.
**Registration happens at the composition root.**
All commands are wired in `ServerApp` by calling `parserDispatcher.register(...)` and `commandRouter.register(...)`.
This keeps the wiring explicit and compiler-checked.
@@ -0,0 +1,128 @@
# Command Infrastructure
This document describes the generic command infrastructure that lives in the `network/` layer.
It covers the parsing pipeline, the routing pipeline, and the base types that every command builds on.
The infrastructure is intentionally project-agnostic: It has no knowledge of specific commands and is never modified when a new command is added.
## Overview
An incoming request travels through two sequential pipelines: **parsing** and **execution**.
The parsing pipeline converts a stringly-typed `PrimitiveRequest` into a strongly-typed `Request` subclass.
The execution pipeline routes that typed request to the correct handler, which produces a `Response`.
<img src="../../../images/docs/networking/commands/sequence_diagram.png" alt="Sequence diagram of all involved components to process and respond to an incoming request" />
## Parsing Pipeline
### `CommandParser<T extends Request>`
<img src="../../../images/docs/networking/commands/command_parser.png" alt="Class diagram of the CommandParser" />
The `CommandParser` is a single-method interface responsible for converting a `PrimitiveRequest` into a concrete, typed `Request` subclass.
Implementations live in `app/commands/<name>/` and are registered by name in `CommandParserDispatcher`.
The parser is the correct place to validate and extract parameters.
If a required parameter is absent, `RequestParameterAccessor.require(...)` throws an `MissingParameterException`, which the `SessionReader` catches and converts into a `MISSING_PARAMETER` error response for the client.
Parsers **do not** perform any domain logic. Their only job is extraction and type conversion.
### `CommandParserDispatcher`
<img src="../../../images/docs/networking/commands/command_parser_dispatcher.png" alt="Class diagram of CommandParserDispatcher" />
The `CommandParserDispatcher` holds a map from command name strings (e.g. `"PING"`) to their corresponding `CommandParser`.
When the `SessionReader` receives a `PrimitiveRequest`, it calls `dispatcher.parse(...)`, which looks up the parser by the request's command string and delegates parsing.
If no parser is registered for the command name, `parse(...)` throws an `UnknownCommandException`, which `SessionReader` catches and converts into an `UNKNOWN_COMMAND` error response for the client.
### `RequestParameterAccessor`
<img src="../../../images/docs/networking/commands/request_parameter_accessor.png" alt="Class diagram of RequestParameterAccessor" />
The `RequestParameterAccessor` is a helper provided to parsers for reading typed parameter values from a `PrimitiveRequest`.
It indexes the parameter list by key on construction for O(1) lookups.
```java
// Require a parameter — throws MissingParameterException if absent
String username = accessor.require("USERNAME");
// Require and parse — throws ParameterParseException if conversion fails
int count = accessor.require("COUNT", Integer::parseInt);
// Optional with a default
String mode = accessor.optional("MODE", "default");
```
The `ThrowingParser<T>` functional interface accepted by the typed overloads allows any checked or unchecked exception to propagate from the conversion function.
The `RequestParameterAccessor` wraps it in a `ParameterParseException`.
## Execution Pipeline
### `Request`
<img src="../../../images/docs/networking/commands/request.png" alt="Class diagram of the Request" />
The `Request` is the abstract base class for all typed command requests. It carries a `RequestContext`, an immutable record containing the originating `SessionId` and the numeric `requestId`.
Both of which are later used by the handler to direct the response to the correct session.
Concrete subclasses add command-specific fields, all set via constructor. Requests are immutable value objects. They carry data, not behaviour.
### `CommandHandler<T extends Request>`
<img src="../../../images/docs/networking/commands/command_handler.png" alt="Class diagram of the CommandHandler" />
The `CommandHandler` is an abstract base class responsible for executing a typed request.
The handler contains the domain logic: reading from registries and managers, modifying state, and dispatching a response via the `ResponseDispatcher`.
Handlers receive their dependencies (the `ResponseDispatcher`, registries and managers etc.) through constructor injection.
They can also register reusable pre-execution checks via `addCheck(...)`. These checks are stored on the handler and are evaluated before `execute(...)` runs.
When a piece of trivial validation is shared by multiple handlers, it should be extracted into a dedicated `HandlerCheck` instead of being duplicated in each handler.
### `HandlerCheck`
<img src="../../../images/docs/networking/commands/handler_check.png" alt="Class diagram of HandlerCheck and CommandHandlerExecutor" />
The `HandlerCheck` is a functional interface for reusable pre-execution validation.
Its `check(...)` method receives the incoming `Request` and returns an empty `Optional` if the request may continue.
If the check fails, it returns an `ErrorResponse` wrapped in the `Optional`, which will be dispatched to the client instead of calling the handler.
This is the right place for small shared checks such as "is the user logged in?" or other simple preconditions that multiple handlers need.
### `CommandHandlerExecutor`
<img src="../../../images/docs/networking/commands/handler_check_executor.png" alt="Class diagram of HandlerCheck and CommandHandlerExecutor" />
The `CommandHandlerExecutor` runs all checks registered on a handler before invoking `execute(...)`.
If any `HandlerCheck` returns a response, the executor dispatches it immediately and aborts execution.
Otherwise, the handler is executed normally.
This keeps precondition handling separate from the actual domain logic inside the handler.
### `CommandRouter`
<img src="../../../images/docs/networking/commands/command_router.png" alt="Class diagram of the CommandRouter" />
The `CommandRouter` maps `Request` subclasses to their handlers using the request's runtime class as the key.
The type safety of `register(...)` ensures that a handler can only be registered for the exact type it is parameterised on.
The unchecked cast in `execute(...)` is therefore safe by construction and is documented with a `@SuppressWarnings` comment in the source.
If no handler is registered for the given request type, `execute(...)` throws `UnknownRequestException`.
Unlike `UnknownCommandException` (which covers unknown command strings), this exception indicates a programming error i.e. a parser was registered without a corresponding handler.
## Response Types
<img src="../../../images/docs/networking/commands/response_types.png" alt="Class diagram of the response interface and built-in implementations" />
The `Response` is the abstract base for all server responses. Its two concrete branches are `SuccessResponse` (prefix `+OK`) and `ErrorResponse` (prefix `-ERR`).
Command-specific responses extend `SuccessResponse` and populate the body using the `ResponseBodyBuilder`.
`OkResponse` is a pre-built convenience subclass of `SuccessResponse` with an empty body, used for commands that need only acknowledge success without returning data (e.g. `PING`).
The body is built with a fluent `ResponseBodyBuilder`:
```java
// Simple key/value parameters
new ResponseBodyBuilder()
.param("STATUS", UsernameAvailability.FREE)
.build();
// Nested block
new ResponseBodyBuilder()
.block("USER", b -> b
.param("ID", user.getId().value())
.param("NAME", user.getName()))
.build();
```
`ResponseEncoder` serialises the body into the wire format (tab-indented, `END`-terminated blocks) and wraps it in a `PrimitiveResponse`.
`ResponseDispatcher` then enqueues this into the target session's bounded response queue.
@@ -0,0 +1,218 @@
# Implementing a Command
This guide walks through the full process of adding a new command to the server. By the end you
will have a working command with a Parser, Request, Handler, and Response, all correctly wired
into the server.
For background on how these components interact at a technical level, see [Command Infrastructure](../reference/command-infrastructure.md).
## Before You Start
A command consists of exactly four classes, all placed in the same package:
```
app/commands/<your_command>/
YourCommandParser.java
YourCommandRequest.java
YourCommandHandler.java
YourCommandResponse.java ← omit this if OkResponse is sufficient
```
Name the package after the command in `snake_case`, matching the wire-protocol name (e.g. `join_lobby` for the `JOIN_LOBBY` command).
Name the classes in `UpperCamelCase` with the command name as prefix.
## Step 1 — Define the Request
The `Request` subclass is a typed, immutable value object holding everything the handler needs.
Define it first, because both the Parser and the Handler depend on it.
```java
package ch.unibas.dmi.dbis.cs108.casono.server.app.commands.greet;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.request.Request;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.request.RequestContext;
public class GreetRequest extends Request {
private final String name;
public GreetRequest(RequestContext context, String name) {
super(context);
this.name = name;
}
public String getName() {
return name;
}
}
```
**Rules for the Request class:**
- Always pass `context` directly to `super(context)`. Never store it in a separate field.
- Fields must be `private final`. Set them only through the constructor.
- Provide a getter for every field. No setters.
- No logic. The request is data, not behaviour.
## Step 2 — Implement the Parser
The Parser extracts parameters from the `PrimitiveRequest` and constructs the typed Request.
```java
package ch.unibas.dmi.dbis.cs108.casono.server.app.commands.greet;
import ch.unibas.dmi.dbis.cs108.casono.server.network.command.parsing.CommandParser;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.request.PrimitiveRequest;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.request.accessor.RequestParameterAccessor;
public class GreetParser implements CommandParser<GreetRequest> {
@Override
public GreetRequest parse(PrimitiveRequest primitiveRequest) {
RequestParameterAccessor accessor = new RequestParameterAccessor(primitiveRequest.parameters());
String name = accessor.require("NAME");
return new GreetRequest(primitiveRequest.context(), name);
}
}
```
**Rules for the Parser class:**
- Always create a `RequestParameterAccessor` from `primitiveRequest.parameters()`.
- Use `accessor.require(key)` for mandatory parameters. It throws `MissingParameterException`
automatically — do not write your own null checks.
- Use `accessor.optional(key, defaultValue)` for optional parameters.
- Use the typed overloads (e.g. `accessor.require("COUNT", Integer::parseInt)`) for non-string
parameters. The resulting `ParameterParseException` is handled by `SessionReader`.
- Always pass `primitiveRequest.context()` as the first argument to the Request constructor.
- No domain logic.
### Choosing between `require` and `optional`
| Use | When |
|-|-|
| `accessor.require(key)` | The command cannot function without this parameter |
| `accessor.require(key, parser)` | Same, but the value must be converted to a specific type |
| `accessor.optional(key, default)` | The parameter has a sensible default when omitted |
| `accessor.optional(key, default, parser)` | Optional + type conversion |
## Step 3 — Implement the Response
If your command returns data, create a dedicated Response class. If it only needs to signal
success, use `OkResponse` directly in the handler and skip this step.
```java
package ch.unibas.dmi.dbis.cs108.casono.server.app.commands.greet;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.request.RequestContext;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.SuccessResponse;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.builder.ResponseBodyBuilder;
public class GreetResponse extends SuccessResponse {
public GreetResponse(RequestContext context, String greeting) {
super(context, new ResponseBodyBuilder()
.param("GREETING", greeting)
.build());
}
}
```
**Rules for the Response class:**
- Extend `SuccessResponse` for successful outcomes, not `Response` directly.
- Build the body inline in the `super(...)` call using `ResponseBodyBuilder`. Do not store
the builder or body separately.
- Use `ResponseBodyBuilder.block(tag, consumer)` to add nested structures when the response
carries a list or a complex sub-object.
- Parameter keys must be `UPPER_SNAKE_CASE` to match the wire protocol convention.
- If you need to return an error (e.g. lobby not found), do not throw — dispatch an
`ErrorResponse` from the handler instead (see Step 4).
## Step 4 — Implement the Handler
The Handler contains the domain logic. It reads from registries, modifies state if needed, and
always dispatches exactly one response.
```java
package ch.unibas.dmi.dbis.cs108.casono.server.app.commands.greet;
import ch.unibas.dmi.dbis.cs108.casono.server.network.command.execution.CommandHandler;
import ch.unibas.dmi.dbis.cs108.casono.server.network.protocol.response.dispatcher.ResponseDispatcher;
public class GreetHandler implements CommandHandler<GreetRequest> {
public final ResponseDispatcher responseDispatcher;
public GreetHandler(ResponseDispatcher responseDispatcher) {
this.responseDispatcher = responseDispatcher;
}
@Override
public void execute(GreetRequest request) {
GreetResponse response = new GreetResponse(request.getContext(), "Hello " + request.getName() + ", nice to meet you");
responseDispatcher.dispatch(response);
}
}
```
**Rules for the Handler class:**
- Declare all dependencies as `private final` fields, injected through the constructor.
- Use `addCheck(...)` to attach pre-execution checks that should run before `execute(...)`.
- If several handlers share the same trivial logic, such as verifying that the user is logged in,
extract that logic into a separate `HandlerCheck` and reuse it instead of duplicating the code.
- Always dispatch exactly one response per execution path. Every branch must end with a
`responseDispatcher.dispatch(...)` call.
- Use `ErrorResponse` for domain-level failures (e.g. entity not found, precondition not met).
Do not throw exceptions for expected failure cases.
- Use `request.getContext()` when constructing any Response — never construct a `RequestContext`
yourself.
- Do not call `responseDispatcher.dispatch(...)` more than once in a single `execute` invocation.
## Step 5 — Register the Command
Open `ServerApp.registerCommands(...)` and add two lines: one to register the parser and one to
register the handler.
```java
private static void registerCommands(
CommandParserDispatcher parserDispatcher,
CommandRouter commandRouter,
ResponseDispatcher responseDispatcher /* add new dependencies here */) {
// ... existing commands ...
parserDispatcher.register("GREET", new GreetParser());
commandRouter.register(GreetRequest.class,
new GreetHandler(responseDispatcher));
}
```
The string passed to `parserDispatcher.register(...)` must exactly match the command name as
sent by the client on the wire, in `UPPER_SNAKE_CASE`.
> **Important:** Always register both the parser **and** the handler. Registering a parser
> without a handler will result in an `UnknownRequestException` at runtime when the command is
> received — the parser will succeed, but the router will find no handler for the resulting
> request type.
## Common Mistakes
**Forgetting to pass `context` through to the Response.** The `context` is how the response
finds its way back to the right client. Dropping it means the response is dispatched to the
wrong session or causes a NullPointerException.
**Putting domain logic in the Parser.** Parsers run before the request is validated as
meaningful. A parser that calls a registry or modifies state creates hidden coupling between the
parsing and execution phases and makes the parser difficult to test.
**Dispatching a response before an early return.** A common mistake is to dispatch an error
and then fall through to dispatch a success response as well. Always `return` immediately after
dispatching an error.
**Using a raw string for the error code.** Error codes should be `UPPER_SNAKE_CASE` constant
strings that the client can match against programmatically. Avoid spaces or punctuation.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,85 @@
# Server-Side Networking — How It All Fits Together
This doc is meant to give a solid mixed-level understanding of how our server-side networking works. No deep dives — just a clear picture of what's happening under the hood when a client connects and sends a command.
> **Note:** This is v1. Annotations and Reflection-based dispatching are on the roadmap but not covered here yet.
> **Disclamer:** This document has been written by Claude. I modified certain parts and verified its contents for correctness.
## Our Protocol at a Glance
Our protocol is inspired by **POP3** - a classic, text-based protocol that communicates over a raw TCP connection. The idea is simple: the client sends a command as a plain-text string, and the server responds with either a success or an error.
A typical exchange looks something like this:
```
Client → GET_DELTA SINCE=42
Server → +OK
PLAYER_FOLDED playerId=3
POT 240
NEXT_TURN playerId=1
.
```
Responses start with `+OK` on success or `-ERR` when something goes wrong. Commands are short, uppercase strings - sometimes followed by arguments.
We don't use HTTP, there's no JSON body, no headers. Just a raw socket, a text stream, and a clearly defined set of commands.
## Core Components & Their Roles
<img src="../../images/docs/networking/server-architecure/networking_components.png" alt="PlantUML diagram of all components outlined in this document" />
Here's a quick rundown of the main building blocks:
### `NetworkManager`
This is the entry point. It binds to a specific port and listens for incoming TCP connections.
Once a client connects, it creates a `Session` adds it to the `SessionManager` and goes back to waiting. Its not the responsibility of the `NetworkManager` to recieve and send data from and to each connected client.
### `Session`
Every client that connects has its own `Session` instance running on its own thread. This component owns the lifecycle of that connection: it reads incoming data, passes it along for processing, and writes responses back.
### `SessionId`
The `SessionId` is used to uniquely identify each session. Essentially its a wrapper arround the UUID type.
### `SessionManager`
The `SessionManager` stores all currently active sessions. It allows for the retrieval of a specific session by its id.
### `ProtocolParser`
Raw text (encapsulated in a `RawRequest`) coming off the socket isn't immediately useful — the `ProtocolParser` turns it with the help of the `Tokenizer` into a `PrimitiveRequest`.
### `RawRequest`
The `RawRequest` object is created after a message has been recieved.
It holds both a reference to the `Session` that recieved the message and the message itself.
### `PrimitiveRequest`
The `PrimitiveRequest` object is created by the `ProtocolParser` after the content of the `RawRequest` has been tokenized by the `Tokenizer`.
The command is stored in its own attribute and the arguments are accessible as a dictionary.
### `Tokenizer`
The job of the `tokenizer` is it, to take the raw string and turn it into tokens.
For example, the command `CHAT_LOBBY GAME=12 MESSAGE='All-in?'` will be decoded as `"CHAT_LOBBY", "GAME", "=", "12", "MESSAGE", "=", "All-in?"`.
It is unaware about the meaning.
### `CommandParser` (per command)
Takes in the `PrimitiveRequest` and checks if all required fields are provided with the correct value.
Creates a command specific `Request` object containing command arguments in a structured manner.
### `Request` (per command)
Has fields common along each implementation such as a reference to the `Session` that recieved the request.
Furthermore each implementation has fields unique to each command. For example, the `ChatLobbyRequest` has fields for the game and the message.
### `CommandRouter`
By identifying the type of class of the `Request`, the `CommandRouter` routes the request to the matching `CommandHandler`.
### `CommandHandler` (per command)
Each supported command has its own handler — a small, focused class that contains the logic for that specific command. They have access to the domain, containing inner parts of the game itself.
### `Response` (per response)
The interface has two sub-interfaces for either failed `ErrorResponse` or successfull `SuccessResponse` execution of commands.
Each step has exactly one responsibility. Increasing the ability to test and extend different components later on.
## Concurrency - Handling Multiple Clients
Every incoming connection spawns a new **Thread**. This means multiple clients can be served simultaneously without blocking each other.
As each `Session` runs entirely on its own thread, there's no shared mutable state between sessions, with exception of the `SessionManager` and other key components explained later.
+72
View File
@@ -0,0 +1,72 @@
# Our Network Protocol Documentation
## Overview
Our protocol is inspired by *POP3*, but has been highly customized to fit our specific needs.
It is a text-based protocol operating over raw TCP sockets, designed for human readability and strict structure.
## Packet Structure
Each network packet consists of:
- **4-byte header**: Specifies the size of the payload (big-endian integer).
- **4-byte request ID**: Generated by the client, used to match requests and responses.
- **Payload**: The actual data, its size as specified by the header.
This structure is used for both requests and responses.
## Conventions
- All keys (in both requests and responses) use UPPER_SNAKE_CASE.
- Only a-z, A-Z, 0-9 are allowed in keys.
- Only human-readable strings are transmitted.
- Binary data is not allowed.
## Request Format
A request consists of a single line:
```
COMMAND KEY1=ARG1 KEY2=ARG2
```
- **COMMAND**: The action to perform.
- **KEY=VALUE pairs**: Optional parameters. There may be zero or more.
- **Whitespace**: Extra spaces between key, separator, and value are ignored. Any other characters between them are an error.
- **Standalone values**: Not allowed. Every value must have a key.
### String Values
- Strings with spaces must be enclosed in single quotes: `'example string'`.
- Inside quoted strings, line breaks are allowed.
- To include a single quote inside a string, escape it (e.g., `'It\'s fine'`).
If these rules are violated, the request is considered invalid and will be rejected.
## Response Format
Responses are more complex and can represent nested collections.
- **Success**: Starts with `+OK`
- **Error**: Starts with `-ERR`
- After the status, a newline follows, then fields in the format `KEY=VALUE`.
- Collections and elements are ended with the `END` keyword.
- A collection starts with a key, and its elements are indented.
- A element starts with a key, and its fields are indented.
### Example: Nested Collection
```
+OK
KEY1=VALUE1
FIELDS
FIELD
NESTED_KEY=NESTED_VALUE
END
END
KEY2=VALUE2
END
```
## Error Handling
Any violation of the format (invalid characters, unescaped quotes, binary data, etc.) results in the request being rejected with an error response.
### Example Error Response When Violating Syntax Rules:
```
-ERR
CODE=PARSING_ERROR
MSG='Error occured during parsing. Likely due to malformed payload.'
END
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@@ -0,0 +1,8 @@
@startuml
skinparam backgroundColor transparent
interface CommandHandler<T extends Request> {
+ execute(request: T): void
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

@@ -0,0 +1,8 @@
@startuml
skinparam backgroundColor transparent
interface CommandParser<T extends Request> {
+ parse(primitiveRequest: PrimitiveRequest): T
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

@@ -0,0 +1,11 @@
@startuml
skinparam backgroundColor transparent
class CommandParserDispatcher {
- parsers: Map<String, CommandParser>
+ register(command: String, parser: CommandParser): void
+ parse(primitiveRequest: PrimitiveRequest): Request
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@@ -0,0 +1,10 @@
@startuml
skinparam backgroundColor transparent
class CommandRouter {
- handlers: Map<Class<? extends Request>, CommandHandler<?>>
+ register(requestClass: Class<T>, handler: CommandHandler<T>): void
+ execute(request: Request): void
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@@ -0,0 +1,8 @@
@startuml
skinparam backgroundColor transparent
interface HandlerCheck {
+ check(request: Request): Optional<Response>
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@@ -0,0 +1,31 @@
@startuml
skinparam backgroundColor transparent
class CommandHandlerExecutor {
- responseDispatcher: ResponseDispatcher
+ CommandHandlerExecutor(responseDispatcher: ResponseDispatcher)
+ execute(handler: CommandHandler<Request>, request: Request): void
}
interface HandlerCheck {
+ check(request: Request): Optional<Response>
}
abstract class CommandHandler<T extends Request> {
- checks: List<HandlerCheck>
# addCheck(check: HandlerCheck): void
+ getChecks(): List<HandlerCheck>
+ execute(request: T): void
}
interface ResponseDispatcher
class Request
class Response
CommandHandlerExecutor --> CommandHandler : executes
CommandHandler "1" o-- "0..*" HandlerCheck : registered checks
CommandHandlerExecutor --> HandlerCheck : evaluates
HandlerCheck ..> Request : inspects
HandlerCheck ..> Response : returns failure response
CommandHandlerExecutor --> ResponseDispatcher : dispatches failures
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

@@ -0,0 +1,33 @@
@startuml
skinparam backgroundColor transparent
package "network/ (infrastructure)" {
class PrimitiveRequest <<record>>
interface CommandParser<T extends Request>
interface CommandHandler<T extends Request>
class CommandParserDispatcher
class CommandRouter
abstract class Request
abstract class Response
PrimitiveRequest --> CommandParserDispatcher : routes
PrimitiveRequest ..> CommandParser : parsed by
CommandParserDispatcher --> CommandParser : routes to
CommandParser --> Request : parses to
Request --> CommandRouter : routes
CommandRouter --> CommandHandler : routes to
Request ..> CommandHandler : executed by
CommandHandler --> Response : creates
}
package "app/commands/<name>/ (per command)" {
class ExampleParser implements CommandParser
class ExampleRequest extends Request
class ExampleHandler implements CommandHandler
class ExampleResponse extends Response
ExampleParser --> ExampleRequest : parses to
ExampleRequest --> ExampleHandler : executed by
ExampleHandler --> ExampleResponse : produces
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

@@ -0,0 +1,11 @@
@startuml
skinparam backgroundColor transparent
abstract class Request {
# context: RequestContext
+ getContext(): RequestContext
+ getSessionId(): SessionId
+ getRequestId(): int
}
@enduml
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,14 @@
@startuml
skinparam backgroundColor transparent
class RequestParameterAccessor {
- index: Map<String, String>
+ RequestParameterAccessor(parameters: List<RequestParameters>)
+ require(key: String): String
+ require(key: String, parser: ThrowingParser<T>): T
+ optional(key: String, defaultValue: String): String
+ optional(key: String, defaultValue: T, parser: ThrowingParser<T>): T
}
@enduml

Some files were not shown because too many files have changed in this diff Show More