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

  1. 01

    Model the board as a case class

    ~1.5h

    Represent the 3x3 board as an immutable Vector of cell states wrapped in a case class.

  2. 02

    Implement move validation

    ~1.5h

    Write logic that rejects moves on occupied cells or out-of-range coordinates.

  3. 03

    Implement win and draw detection

    ~2h

    Check rows, columns, and diagonals recursively to detect a winner or a draw.

  4. 04

    Build the game loop

    ~2h

    Alternate turns between two players, printing the board after each move until the game ends.

  5. 05

    Write unit tests

    ~1.5h

    Test 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