Skip to content

Latest commit

 

History

History
96 lines (93 loc) · 4.56 KB

notes.org

File metadata and controls

96 lines (93 loc) · 4.56 KB

TIC TAC TOE game

The exercise involves developing a Tic-Tac-Toe game strictly adhering to the TDD rules.

1 – Game Board Creation phase

  • State “DONE” from “TODO” [2021-03-29 Mon 16:59]

describe board

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 16:59]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 16:46]

describe winning scenarios

player with all cells in row wins

  • State “DONE” from “TODO” [2021-03-29 Mon 18:53]

player with all cells in column wins

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 19:07]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 18:53]

asc diagonale winning scenario

  • State “DONE” from “TODO” [2021-03-29 Mon 21:14]

desc diagnoel winning scenario

  • State “DONE” from “TODO” [2021-03-29 Mon 21:17]

IN-PROGRESS describe board operations

  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 18:14]

get diagonale forward

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 19:48]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 19:11]

get desc diagonale

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 21:06]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 19:48]

occupy 0 row and 0 collumn by player X

  • State “DONE” from “TODO” [2021-03-29 Mon 18:01]

retrieve board row by index offset

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 18:51]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 18:14]

retrieve bord column by index offset

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 19:05]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 18:56]

IN-PROGRESS describe player move

  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 21:18]

how player makes a move

  • State “DONE” from “TODO” [2021-03-29 Mon 21:54]

display board-size

  • State “DONE” from “TODO” [2021-03-29 Mon 22:54]

display row

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 22:30]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 22:15]

board should be rendered using terminal

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 22:30]
  • State “IN-PROGRESS” from “IN-PROGRESS” [2021-03-29 Mon 22:30]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 21:55]

game play

game should start with empty board and first player to do a move

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 22:55]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 22:55]

if current player is :x next player should be :o after game-round

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 23:17]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 22:55]

if current player is x board should contain players move after round

  • State “DONE” from “TODO” [2021-03-29 Mon 23:18]

IN-PROGRESS game loop

  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 23:37]

Tech debt

extract board offset calculation

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 17:32]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 17:27]

complicated won logic refactor!

  • State “DONE” from “IN-PROGRESS” [2021-03-29 Mon 18:52]
  • State “IN-PROGRESS” from “TODO” [2021-03-29 Mon 18:01]

extract won logic as it is same for row,col and most probably diagonale

cleanup board diagnoale functions

define function is-empty to test for board cell emptines

we most probably do not need board offset (examine and refactor)

  • offset proved to be useful :-)
    • State “DONE” from “TODO” [2021-03-29 Mon 22:35]