Tic-Tac-Toe
From BP Wiki
Contents
A behavioral program for the game of Tic-Tac-Toe
- Download the example from LINK
b-Threads
Rules of the game
- SquareTaken: block further marking of a square already marked by X or O.
- EnforceTurns: alternately block O moves while waiting for X moves, and vice versa (we assume that X always plays first).
- DetectXWin: wait for placement of three X marks in a line and request XWin.
- DetectOWin: wait for placement of three O marks in a line and request OWin.
- DetectDraw: wait for nine moves and request draw event.