A Java-based Swing GUI puzzle game with multiple gameplay modes and level challenges. Experience the thrill of matching three or more identical pieces in a row or column to clear them from the board and score points!
-
Three Exciting Game Modes:
- Classic Mode: Traditional match-3 gameplay
- Coin Mode: Collect gold coins as they fall from the top
- Obstacle Mode: Strategize around obstacles on the board
-
Multiple Difficulty Levels:
- Three distinct levels with increasing challenges
- Step limits and score targets to achieve
-
Rich Game Mechanics:
- Animated piece movements and eliminations
- Score tracking across multiple stages
- Adjustable animation speed
- Save and load game progress
-
Customization Options:
- Change background images
- Adjust music and sound effects
- Modify animation speed (Fast, Normal, Slow)
The original match-3 experience with no special elements. Focus on strategy and pattern recognition to achieve high scores within the step limit.
Collect falling gold coins (+) that appear at the top of the board. Each coin collected contributes to your progress toward the level goal. Plan your moves carefully to maximize coin collection while maintaining high scores.
Navigate around obstacles (-) that block piece movement and cannot be swapped. These fixed elements add strategic depth, requiring you to plan several moves ahead to create optimal matches.
| Symbol | Name | Description |
|---|---|---|
1 |
Gem | Standard game piece |
2 |
Circle | Standard game piece |
3 |
Triangle | Standard game piece |
4 |
Diamond | Standard game piece |
+ |
Gold Coin | Collectible item in Coin Mode |
- |
Obstacle | Immobile block in Obstacle Mode |
a |
All-Clear | Special piece that clears all pieces |
k |
Knock | Special piece with unique effects |
b |
Bomb | Exploding piece with area effects |
- Mouse Click: Select a piece
- Mouse Drag/Swap: Exchange adjacent pieces
- Menu Options: Access game settings and modes
- Animation Speed: Adjust from Fast (500ms) to Slow (1300ms)
- Background: Customize with your own image files
- Audio: Control background music, sound effects, and volume
- Java Development Kit (JDK) 8 or higher
- A Java IDE (recommended: IntelliJ IDEA) or command line access
- Open the project in your Java IDE
- Set
Main.javaas the entry point - Run the application
# Compile all Java files
javac -d out src/**/*.java
# Run the game
java -cp out MainCS109-Introduction-to-Computer-Programming-Project/
├── controller/ # Game logic controllers
│ └── GameController.java # Main game controller handling player input and game state
├── Core/ # Game mode implementations and core logic
│ ├── Mode0.java # Classic game mode implementation
│ ├── Mode1.java # Coin game mode implementation
│ ├── Mode2.java # Obstacle game mode implementation
│ ├── threeMatch.java # Core matching algorithm and game logic
│ ├── circleTranslation.java # Experimental feature
│ ├── CounterApp.java # Experimental counter application
│ ├── MusicPlayertrial.java # Music player trial implementation
│ ├── removablePostion.java # Experimental feature for removing positions
└── Enters/ # Entry point and startup interface
│ └── Enterframe.java # Main entry frame with startup menu and settings
├── Filepart/ # File I/O operations and data management
│ ├── AddWrite.java # Handles adding data to files
│ ├── CreateTxtFile.java # Creates text files for game data
│ ├── ReadAndOverwrite.java # Reads and overwrites file contents
│ ├── TimeRecording.java # Handles time recording functionality
│ ├── createList.java # Creates game data lists
│ ├── getInformation.java # Retrieves game information from files
│ ├── judgeMode.java # Determines game mode from saved data
│ └── FileTest.java # File operations testing
├── listener/ # Event listeners
│ └── GameListener.java # Handles game-related events and user interactions
├── model/ # Data models and game state
│ ├── Chessboard.java # Represents the game board and its state
│ ├── ChessPiece.java # Represents individual game pieces
│ ├── Cell.java # Represents a cell on the chessboard
│ ├── ChessboardPoint.java # Represents a point on the chessboard
│ ├── Constant.java # Game constants and configuration
│ └── Util.java # Utility functions and helpers
├── MusicController/ # Audio management
│ ├── BGMadjuster.java # Background music controller
│ ├── MusicEffectAdjuster.java # Sound effects controller
│ └── VolumeAdjuster.java # Volume control interface
├── RecordingData/ # Saved game data
├── TestCase/ # Unit tests
├── view/ # GUI components
│ ├── ChessGameFrame.java # Main game window and frame
│ ├── ChessboardComponent.java # Visual representation of the chessboard
│ ├── ChessComponent.java # Visual representation of chess pieces
│ └── CellComponent.java # Visual representation of board cells
├── Main.java # Program entry point
└── README.md # This documentation
- Complete each level by reaching the target score
- Work within the step limit for each level
- Progress through stages to unlock higher levels
- Save your progress and return to continue your adventure
- Save Game: Automatically prompted when closing
- Load Game: Use the "Read Archive" button to load from a .txt file
- Game Records: Stored in the RecordingData folder
- Points awarded for each match based on the number of pieces eliminated
- Bonus points for creating special pieces or chain reactions
- Cumulative scoring across multiple stages
- Game records are saved in
Filepart/recording.txt - Highest scores are tracked in
Filepart/bestrecord.txt - View your progress through the "Find Record" menu options
- The game board is fixed at 8×8 squares
- Initial boards are generated to avoid pre-existing matches
- Piece colors and appearance are defined in
Constant.java - Image resources are loaded from local paths (consider packaging for distribution)
Enjoy the game? Found a bug? Have suggestions for improvement? Feel free to contribute to make this match-3 experience even better!
