- Name: Rishit Nanda
- Roll No: 2025111008
- RED: even turns (0, 2, 4, ...)
- BLUE: odd turns (1, 3, 5, ...)
- Board size: 24 × 24
- Rows and columns are numbered 1-24 (enter coordinates in that range)
- Enter
-1 -1to quit
- RED cannot place on columns 1 or 24.
- BLUE cannot place on rows 1 or 24.
- A move is invalid if:
- It's outside 1-24
- The cell is already occupied
- It violates the color-specific restriction
- Players alternate placing colored dots on the board
- When a dot is placed, the game automatically creates edges (connections) to adjacent dots of the same color
- Adjacent means knight's move distance (like in chess: 2 squares in one direction, 1 square perpendicular)
- Edges cannot cross each other - if a potential edge would intersect an existing edge, it won't be created
- RED wins by creating a connected path from row 1 to row 24 (1/2-23/24 also works as its trivial that blue's path is now blocked)
- BLUE wins by creating a connected path from column 1 to column 24 (1/2-23/24 also works as its trivial that red's path is now blocked)
- A connected path means dots linked by edges, allowing you to traverse from one winning zone to the other
- Build:
make - Run:
make runor./game - Clean build artifacts:
make clean