Course: CS151 Object-Oriented Design
Instructor: Professor Telvin Zhong
Semester: Fall 2025
Team Members: Abhik Das, Julia Husainzada, Sweksha Shaw, Matthew Yeh
VIDEO SUBMISSION: https://drive.google.com/file/d/1PXiIM3EG6aNGfdMWOvjv6qSCB0fAAeUR/view
This project is a full Java/JavaFX application that implements a Game Manager capable of launching two fully playable games: Blackjack and Snake. The project implements user login and account creation, persistent high score tracking for both games, loading and saving, and scene management for seamless navigation.
Manager
-
Main.java– JavaFX application entry point -
GameManager.java– Core manager handling game switching and global app state -
LoginView.java– UI logic for login screen -
MainMenuView.java– UI logic for main menu -
ToolbarView.java– Controls shared in-game toolbar -
AccountManager.java– Reads and writes user_accounts.txt -
HighScoreManager.java– Reads and writes high_scores.txt -
User.java– Represents a user account -
WelcomeView.java- Represents welcome view
Blackjack
-
BlackjackGame.java– Runs core Blackjack gameplay: turns, betting, outcomes, and player management -
BlackjackVisualizer.java– Renders main Blackjack table and controls -
Card.java– Represents a card -
Deck.java– Manages a full deck -
Hand.java– Stores and evaluates a player hand -
Player.java– Abstract base class or interface -
HumanPlayer.java– Human-controlled player -
BotPlayer.java– CPU-controlled player (same class for multiple bots) -
Dealer.java– Dealer AI with fixed rules -
TestVisualizer.java– Visualization harness for testing UI components -
BJExitGameView.java- JavaFX exit screen handling quit confirmation and returning to menu. -
BJStartGameView.java- Initial start menu screen for configuring options and beginning Blackjack games. -
BJViewManager.java- Coordinates switching between start, game, and exit views or scenes. -
DeckEmptyException.java- Error when drawing from empty deck -
HandVisualizer.java- Displays a hand’s cards and totals
Snake Game
-
SnakeGame.java– Main Snake controller/manager -
SnakeController.java– JavaFX UI controller -
Snake.java– Contains snake segments and movement logic -
Food.java– Represents food items on the board -
Board.java– Board grid and rendering logic -
Direction.java– Enum for movement directions -
CollisionManager.java– Collision helper
util
EncryptionUtils.java- Add encryption and decryption for text username/password and cards
resources
styles.css: UI stylesheet to keep text visible even when field is focused
- Install Maven: Make sure Apache Maven is installed and added to your system PATH.
- Clone the repository:
git clone https://github.com/sweksha-cloud/Game-Manager-CS151-Fall-2025 - Navigate to JavaFX project:
cd Game-Manager-CS151-Fall-2025/democs151javafx - Build the project: In your terminal,
run mvn clean compile
general
- Login or create an account, the nav-bar at the top will always be available to exit the game or logout.
- You may view the scoreboard or select either blackjack or snake game
blackjack instructions and usage
-
The game is played with 1 human player and 3 automated characters (2 computer players and 1 dealer).
-
Players take turns drawing cards to reach a hand value as close to 21 as possible without going over.
-
Placing Bets
-
Before each round, you can place a bet between $1 and $20.
-
Use the provided buttons or input field (depending on your UI) to select your bet amount.
- Playing a Round
-
Click Hit to draw a card.
-
Click Stand to end your turn.
-
Automated characters play their turns automatically.
-
The dealer follows standard Blackjack rules (hits until 17 or higher).
- Winning and Losing
-
If your hand exceeds 21, you bust and lose your bet.
-
If the dealer busts, all remaining players win their bets.
-
Otherwise, hands are compared to the dealer:
-
Higher hand than the dealer → win
-
Equal hand → push (no money lost)
-
Lower hand → lose
- Exiting the Game
-
Click the Exit button to close the game at any time.
-
Your final balance is displayed when you exit.
- Notes
- The game uses mouse input only—keyboard input is not required.
snake game instructions and usage
- Controls
- Use the arrow keys on your keyboard to control the snake:
- Up Arrow → move up
- Down Arrow → move down
- Left Arrow → move left
- Right Arrow → move right
- Gameplay
-
The goal is to eat the food that appears on the screen to grow your snake.
-
Each time the snake eats food, your score increases.
-
Avoid hitting the walls or colliding with yourself, which will end the game.
- Exiting the Game
-
Close the game window to exit at any time.
-
Your final score will be displayed when the game ends.
- Notes
- The game uses keyboard input only; mouse input is not required.
Abhik Das (Ab2d248):
Created and worked on:
BlackjackVisualizer.javaCard.javaDeck.javaHand.javaTestVisualizer.javaBJExitGameView.javaBJStartGameView.javaBJViewManager.javaDeckEmptyException.javaHandVisualizer.java- State transitions and Dynamic view switching
- Unit Tests
Julia Hussainzada (juliahusainzada):
Created and worked on:
Main.javaGameManager.javaLoginView.javaMainMenuView.javaToolbarView.javaAccountManager.javaHighScoreManager.javaUser.javaWelcomeView.java- Encryption/Decription
- Unit Tests
Sweksha Shaw (sweksha-cloud):
Created and worked on:
BlackjackGame.javaPlayer.javaHumanPlayer.javaBotPlayer.javaDealer.javaREADME.md
Matthew Yeh (mattthewyeh):
Created and worked on:
SnakeGame.javaSnakeController.javaSnake.javaFood.javaBoard.javaDirection.javaCollisionManager.java- Music for snake game