Cube
Cube is a strategic card-guessing game developed in Java, inspired by a game played among my roommates. It features a 3x3 grid of face-up playing cards drawn from a shuffled 52-card deck. Each card in the grid acts as a selectable “pile.” The player begins by choosing one of the nine piles and then guesses whether the next card drawn from the deck will be higher, lower, or the same as the card in that pile. If the guess is correct, the new card replaces the old one and the player can continue using that pile. However, if the guess is incorrect, the pile turns red and becomes unusable for the rest of the game.
The objective is to make it through the entire deck of cards without running out of available piles. The game ends either in victory when the deck is fully emptied or in defeat when all nine piles are used up due to incorrect guesses. The interface is built with Java Swing, featuring clean card visuals using ImageIcon, and includes audio feedback for right and wrong guesses through integrated sound files. Additional functionality includes a restart option to begin a new game and an intuitive point-and-click interface for selecting cards and making guesses.
While the current build focuses on the core mechanics, there are also planned enhancements such as a leaderboard, keyboard shortcuts for gameplay (H for higher, L for lower, S for same), and a full sign-in system with first and last name, username, password, and confirmation fields. Cube combines elements of luck and logic in a fast-paced, engaging format that challenges players to make strategic choices as they try to outlast the deck.
If you want to see the GitHub repository click here.
Here is a short demonstration of the application.