Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 2.64 KB

File metadata and controls

58 lines (35 loc) · 2.64 KB

Skill-ShowDown-System-Design-Challenge

bc5710f9-9d97-47a4-9cf7-a6d0e1e1fc03

TicTacToe

How to participate?

Join the Scaler Discord #system-design-breakdown Channel. If you have any doubts, feel free to ask in the ⁠system-design-breakdown channel. We will use this channel to respond to any queries.

When you start the challenge, create a Github Issue on this repository (https://github.com/scaleracademy/Skill-ShowDown-System-Design-Challenge/issues/new) by providing your name, and the date when you start the challenge in the description of the issue. Keep sharing your progress on the issue. Once you have made the submission, you can close this GitHub issue you created.

What is TicTacToe?

TicTacToe is a 2-player game played on a 3 x 3 board. Each player is allotted a symbol (one X and one O). Initially, the board is empty. Alternatively, each player takes a turn and puts their symbol at any empty slot. The first player to get their symbol over a complete row OR a complete column OR a diagonal wins. You can play the game within Google Search by just searching for “tic-tac-toe”!

TicTacToe Image

Problem Statement

Create a Low-Level Design for a common TicTacToe game with the following constraints as shared.

Problem Requirements

  • Board can be of any NxN size.
  • There can be any number of players. Each player will be allotted a symbol.
  • The players can be either humans or bots. Each human player will have a name.
  • Only one Bot is allowed per game.
  • We should allow support to undo any number of moves.
  • Try to implement the winner detection algorithm in O(1).

Expectations

  • The code should be working and functionally correct
  • Good software design practices should be followed:
    • Code should be modular, readable, extensible
    • Separation of concern should be addressed
    • Project structured well across multiple files/ packages
  • Write unit tests.
  • No need for GUI.

Interaction Format

Command Line based interactive application.

Input/ Outputs

Game Start

Allows to start the game with a given number of players, board size, and symbols of every player.

Game Start Image

Example:

Example Image

If a player is a computer, their user id will be C.