ScalabeginnercliAI generated
Console Tic-Tac-Toe Game
Create a two-player tic-tac-toe game that runs in the terminal, using an immutable board represented as a Vector and recursive win-checking logic. Learners practice immutable data structures, recursion, and case classes.
- Estimate
- ~8.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
sbt · ScalaTest
Project roadmap
- 01
Model the board as a case class
~1.5hRepresent the 3x3 board as an immutable Vector of cell states wrapped in a case class.
- 02
Implement move validation
~1.5hWrite logic that rejects moves on occupied cells or out-of-range coordinates.
- 03
Implement win and draw detection
~2hCheck rows, columns, and diagonals recursively to detect a winner or a draw.
- 04
Build the game loop
~2hAlternate turns between two players, printing the board after each move until the game ends.
- 05
Write unit tests
~1.5hTest win detection, draw detection, and move validation with ScalaTest.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
~8.5h · 5 steps
Tech stack
sbtScalaTest