Networked 3 Card Poker A full-stack multiplayer casino game built with JavaFX, implementing client-server architecture using Java Sockets. This project features a polished GUI with FXML layouts, custom CSS styling, and real-time networked gameplay supporting up to 8 concurrent players. Overview This application brings the popular casino game Three Card Poker to life with a complete networked implementation. Players connect to a central game server, place bets, and play against the dealer in real-time. The project showcases advanced GUI design, event-driven programming, and multithreaded networking. Key Features Client Application
Dynamic Multi-Scene Interface: Three distinct scenes (Welcome, Game Play, Win/Loss) with smooth transitions Custom Styling: FXML-based layouts with CSS theming and a "NewLook" feature for dynamic UI updates Interactive Gameplay: Intuitive betting interface with visual feedback for cards, wagers, and game results Real-Time Updates: Live communication with server displaying game state, dealer cards, and payout calculations Responsive Design: Clear visual hierarchy with labeled sections for player cards, dealer cards, betting areas, and total winnings Menu System: Options menu with Fresh Start, NewLook, and Exit functionality
Server Application
Concurrent Client Management: Handles up to 8 simultaneous players, each on separate threads Live Game Monitoring: ListView-based dashboard showing:
Connected clients count Real-time game results for all players Betting amounts and win/loss tracking Client connection/disconnection events
Port Configuration: Configurable port selection with server on/off controls Game Logic Engine: Centralized calculation system for hand evaluation, payouts, and game outcomes
Technologies Used Frontend
JavaFX for GUI framework FXML for declarative UI layouts CSS for custom styling and theming Scene Builder compatible architecture
Backend
Java Sockets for networking Multithreading for concurrent client handling Serializable objects (PokerInfo class) for client-server communication Maven for build management and dependency handling
Testing
JUnit 5 for comprehensive unit testing Test coverage for game logic methods (hand evaluation, payout calculation, hand comparison)
Architecture Client-Server Model
Server: Runs on dedicated thread, spawns new thread per client connection Client: Maintains server connection on separate thread from JavaFX Application thread Communication: Bidirectional using serialized PokerInfo objects
Game Flow
Client connects to server via IP and port Player places Ante and optional Pair Plus wagers ($5-$25 range) Server deals 3 cards to player and dealer Player decides to Play (match Ante bet) or Fold Server evaluates hands, calculates payouts, returns results Win/Loss screen displays with option to play again
Hand Rankings (Highest to Lowest)
Straight Flush (40:1 on Pair Plus) Three of a Kind (30:1) Straight (6:1) Flush (3:1) Pair (1:1) High Card
Project Structure projectThreeServer/ ├── src/main/java/ # Server logic and GUI ├── src/main/resources/ # FXML files and assets ├── src/test/java/ # JUnit test cases └── pom.xml
projectThreeClient/ ├── src/main/java/ # Client logic and GUI ├── src/main/resources/ # FXML files, CSS, assets └── pom.xml Installation & Running Prerequisites
Java JDK 11 or higher Maven 3.6.3 or higher
Running the Server bashcd projectThreeServer mvn clean javafx:run Running the Client bashcd projectThreeClient mvn clean javafx:run Running Tests bashmvn test Technical Highlights Frontend Development Skills
FXML-based component architecture with controller pattern CSS styling and dynamic theme switching Multi-scene navigation and state management User experience design with clear visual feedback Event-driven programming with JavaFX controls Responsive layout design for intuitive gameplay
Backend Development Skills
Socket programming and network protocol design Multithreaded server architecture Thread-safe client session management Object serialization for data transfer Game logic implementation with comprehensive testing Resource management and exception handling
Game Rules Implementation
Ante bet required ($5-$25) Optional Pair Plus side bet ($5-$25) Dealer must have Queen-high or better to qualify Player wins pay 1:1 on Ante and Play bets Pair Plus pays independently based on hand strength All calculations performed server-side for security
Future Enhancements
Database integration for player statistics and leaderboard Authentication system for player accounts Expanded betting options and game variations Mobile-responsive design Spectator mode for observing live games
Development This project was built as part of CS 342 at the University of Illinois at Chicago, demonstrating proficiency in:
GUI development with JavaFX and FXML Client-server networking with Java Sockets Concurrent programming and thread management Software testing with JUnit Maven build system and project structure UX/UI design principles
License Academic project for University of Illinois at Chicago.