← Back to Projects

3 Card Poker

A multiplayer, networked 3-Card Poker game built with Java, featuring a client–server architecture, real-time gameplay, and a JavaFX-based graphical interface.

Client-ServerJava SocketsMavenHTMLCSS

About This Project

This project implements a fully networked version of the casino game 3-Card Poker using Java Sockets and JavaFX. I have split this project into two Maven projects: a multithreaded server and a graphical client. The server manages all game logic, card dealing, bet validation, and payout calculations, while each client connects independently to play their own game session against the dealer. Any number of clients can connect simultaneously, each running on its own thread and interacting with the server through serialized objects. The client provides an intuitive, multi-scene JavaFX interface that allows users to place bets, view cards, make play-or-fold decisions, and see detailed results after each hand. The server includes its own GUI to monitor connected clients, track bets, display game outcomes, and manage server state.

Key Features

  • Client-server architecture using Java Sockets
  • Multithreaded server supporting multiple concurrent clients
  • Separate game instances and decks per client
  • Complete implementation of 3-Card Poker rules and payouts
  • Ante, Pair Plus, and Play wagers with server-side validation
  • Multiple client scenes: welcome screen, gameplay screen, and win/lose screen
  • Server dashboard showing connected clients, bets, wins/losses, and game activity
  • Theme options including classic mode, pastel, and a christmas special

Technologies Used

  • IDE: IntelliJ
  • Java - core language for game logic, networking, and threading
  • Java Sockets - client/server communication
  • JavaFX - GUI development for both client and server
  • FXML & CSS - UI layout and styling
  • JUnit 5 - Unit testing for server/core game logic
  • Maven - project management and build automation

Challenges & Learnings

Challenges:

A major challenge was building reliable client-server communication using Java Sockets while ensuring that all game logic ran only on the server. Supporting multiple clients at once required careful use of multithreading so that each game session remained independent. Another challenge was keeping the JavaFX interface responsive while handling network communication on background threads, especially when switching between different scenes during gameplay.

What I Learned:

This project strengthened my understanding of client-server architecture, networking, and multithreading in Java. I learned how to separate game logic, networking, and user interface code to build a more maintainable application. Additionally, working with JavaFX, FXML, and unit tests improved my ability to design responsive, testable, and event-driven applications.

This project was created in November 2025