Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 442 Bytes

code.md

File metadata and controls

26 lines (20 loc) · 442 Bytes

Practical example

TicTacToe

2 player

  • Game is empty
  • First players play
  • Game is not finished
  • Play: board is not more empty
  • Play: piece is visible
  • Play: not outside the board
  • Play: not if not occupied
  • Play: not the proper player turn (update to not ask the player)

Steps

v1 Init (no src, assert true) v2 new game (game.empty?) v3 play (assert pieces number) v4 get v5 turns v6 valid v7 winner ...