This is my first project and it is a personal one. My aim was to take this problem and find the most efficient, elegant yet simple one; logically and code wise. I wanted my code to be self-explanatory and easy to follow by any one.
This project marks the beginning of my journey towards learning how to design and write sustainable, scalable software that can handle real-life, large-scale applications.
Starting with an empty grid of dots, two players take turns adding a single horizontal or vertical line between two unjoined adjacent dots. The player who completes the fourth side of a 1x1 box (or groups of one or more adjacent boxes) earns one point(s) and takes another turn. The game ends when no more lines can be placed. The winner is the player with the most points.
-
The game grid is 2-Dimentional vector that can be of any size up to 9x9.
-
2-Dimentional vector representing all Boxes formed on the Grid.
-
- Two Dots connect to form an Edge represented by a string.
- Four Dots connect to form a Box.
-
- Each string representing an edge mapped to its Edge object.
- Each Edge, represented by its string is mapped to the Box/Boxes it is a part of.
Feedback is highly appreciated.
Future Update to include : Human Vs Computer Mode - Larger Grid size.