In this project, we are expected to develop a program in Java programming language that imitates the game known as “drop number”, using linked list data structure. In the game, the number given by the user is added to the top of the desired position on the 5x7 game table and the same overlapping values are combined. When 7 elements overlap, the game is over and does not add any more values.
I learned how to connect the Linked List structure and the nodes in a linked list in as many different directions as we want.
I printed the Linked List I created so that each column (from bottom to top) is a row.
The 2nd column has reached 7 elements and we are at the end of the game:
The game is over when a column has 7 elements. Let's try adding a new element to check this. Since the game is over, it gives a game over warning and prints the list without any changes:
Lastly, I wanted to show in the main that the bottom line is bidirectionally connected to each other:
This project was developed by Beyza Yıldızlı. You can find me on LinkedIn or GitHub