Bet308 is a JavaFX card-game sandbox. You can play built-in games, open an authoring environment to make your own JSON game definitions, and optionally connect to a server for accounts, cloud storage of chip balances, and multiplayer rooms.
The codebase is split into three main pieces: game-core for shared logic, game-client for the desktop app, and game-server for the HTTP/WebSocket backend.
- Start Date: 3/19/26
- Finish Date: 5/1/26
- Hours Spent: about 500 total team-hours
- Local play for Blackjack, Poker, and UNO from data-driven JSON definitions
- An authoring environment with templates, validation, live editing, and a save/play loop
- Optional AI opponents, AI-assisted game generation, and in-game move advice when
API_KEYis set - Account, profile, avatar, language, and chip-balance support through the server
- Multiplayer room creation and joining for supported network games
- Extra demo and experimental variants under
game-client/data/games/
game-core: shared model, interpreter/rules logic, validation, macros, and env/resource helpersgame-client: JavaFX UI, authoring tools, local gameplay, network client, assets, and themesgame-server: Javalin server for auth, profile updates, cloud-stored game JSON, rooms, and WebSockets
- Java 25
- Maven
- PostgreSQL, only if you want server-backed features
If you just want to try the app, this is the easiest path:
mvn -pl game-client -am javafx:runIf JavaFX complains about stale compiled classes, use:
mvn -Pfresh -pl game-client -am javafx:runClient main class: oogasalad.Main
Once the app opens, you can choose Play as guest and still use local play and authoring without any server setup.
The server defaults to:
PORT=7070DB_URL=jdbc:postgresql://localhost:5432/oogasaladDB_USER=oogasaladDB_PASSWORD=oogasaladDB_DRIVER=org.postgresql.Driver
So the simplest setup is a local PostgreSQL database named oogasalad with username/password oogasalad. You can also override those values in a repo-root .env file or regular environment variables.
From the repo root:
mvn -pl game-server -am package -DskipTests
mvn -pl game-server exec:javaServer main class: oogasalad.server.GameServerMain
With the server running, the client can use:
OOGASALAD_SERVER_URLfor auth, profile, and cloud JSON storageOOGASALAD_MULTIPLAYER_URLfor multiplayer if you want it to point somewhere else
To use AI-generated authoring or in-game AI advice, add this to .env:
API_KEY=your_duke_ai_api_key- Built-in splash games:
game-client/data/games/default/blackjack.jsongame-client/data/games/default/poker_real_ai_4_handed.jsongame-client/data/games/default/uno.json
- More examples and variants:
game-client/data/games/ - Network-oriented definitions:
game-client/data/games/network/ - Deck definitions:
game-client/data/cards/
These only work in local sessions. They do nothing in networked multiplayer.
| Keys | Effect |
|---|---|
Shift+C |
Add 500 chips |
Shift+X |
Remove 500 chips, but not below 0 |
Shift+R |
Set balance to 10,000 |
Shift+D |
Double current balance |
Shift+B |
Set balance to 0 |
Implementation: game-client/src/main/java/oogasalad/view/play/CheatKeyHandler.java
- Guest mode is enough for local play, testing, and authoring.
- Multiplayer, cloud storage, and account sync need the server and database running.
- The main polished paths are Blackjack, Poker, and UNO, but the repo also includes demo and experimental game JSON files.
- The UI currently supports English and Spanish, plus multiple themes.
- Built with JavaFX, Maven, Javalin, Gson, Log4j, HikariCP, PostgreSQL, JUnit, and TestFX.
- We leaned on official docs for JavaFX, Maven, Javalin, PostgreSQL, and the OpenAI API, and we also used AI tools for brainstorming, debugging, and polishing copy.
This project ended up feeling a lot more like a systems project than a single game. The most satisfying part was getting authored JSON to flow all the way from editor to playable table, and the hardest part was keeping UI, engine, and server work moving together without breaking each other.