Table of Contents
This is our Line 98 project for the Data Structure and Algorithm course at HCMIU in semester 1 (2023-2024). Line 98 is a classic puzzle game that involves moving colored balls to form lines, squares, or blocks of the same color. The game is based on the original Lines 98 game developed by Igor Nedelko and Andrey Akselrod in 1998. The game is implemented in Java using the Swing library for graphics and user interface. We hope you enjoy it!
| No. | Name | StudentID |
|---|---|---|
| 1 | Nguyễn Khánh Hà | ITCSIU21004 |
| 2 | Phạm Anh Huy | ITCSIU21133 |
| 3 | Trần Quang Bảo Duy | ITCSIU21176 |
The game consists of a 10x10 board with randomly placed balls of different colors. The player can select a ball and move it to an empty cell, as long as there is a clear path between the original and the destination cells. The goal is to form horizontal, vertical, or diagonal lines of at least five balls of the same color, which will then disappear and score points. The game also supports two other modes: square mode, where the player has to form squares of four balls of the same color, and block mode, where the player has to form blocks of seven adjacent balls of the same color. The game ends when the board is full and no more moves are possible.
- Clone this repository
- Open the project with IntelliJ IDEA or VSCode and check the file status
- Run the project
- Enjoy the game
git clone https://github.com/hanguyen2403/Line98-DSA.git
git status
- IDE: IntelliJ IDEA
- Language: Java
- Library: standard Java libraries, JavaFX (for sound feartures)
- Tools: Paint / Adobe Photoshop CS6 / Canvas (design particular objects)
- Don't have start and end scene
- Single round
- Non user-friendly interface
The concept of this is first at the start point it will find around them if there is a blank cell that the ball can go, after finding if it have any path, the program will assign the root point to the branch path and then set the brand point as a root point following that it will continuously find until finds the destination path, so that the program will return true and the path is displayed on the scene. If there is not the program will return false and wait for the player to click on another cell.
The undo button is built based on the idea of Doubly Linked List. Each Link will store the data of the board(which is the ball, color and score) and the Linked List will have a method to insert and delete each Link. When the game is processed, each move will call the “saveUndo()” method and save the state of the board, and when the undo button is pressed, the “Undo()” method will get the state inside the Linked List and the board will come back to that state. Additionally, to balance the game, the undo button is limited to 5 times
- Add undo feature
- Add design pattern (Command)



