Circular Linked List Game
Launched May 2023
In order to improve my understanding of data structures, I implemented a circular linked list that accepts a generic type for reusability. I started by creating a class diagram in order to define each class’s fields, methods, interfaces, and relationships.

I also made an object diagram to clarify the structure of the circular linked list and its nodes, and how data flows through the program.

The list is made up of generic Node objects which reference their data and the next Node. The final Node points to the first Node. This adds some complexity to removing and adding Nodes. Rather than for loops, iteration is performed with a generic Iterator since there are no indexes as there would be in an array.
Once the linked list was complete and fully tested using JUnit, I implemented and tested the Player class. The FirstTo100.main() method runs the game, using random numbers to represent the dice rolls and outputting the results of each turn and the final winner. Each time main is run, it results in a different outcome.

Thanks for checking out my project!
Thank you!
Thanks for checking out my work! If you've got a project or job you think suits me, contact me here, by email, or on LinkedIn.
Contact Me
Thanks for dropping by!
Back to top