Skip to content

Instantly share code, notes, and snippets.

@zbunde
Last active August 29, 2015 14:25
Show Gist options
  • Save zbunde/736e96c5cfe3dd8bda77 to your computer and use it in GitHub Desktop.
Save zbunde/736e96c5cfe3dd8bda77 to your computer and use it in GitHub Desktop.

Goals

  • Implement Tic Tac Toe for one client playing "X" and a computer playing a random "O" in response.

Pre Work

  • Write a document that describes each step of the process.
  • What steps do you know how to do?
  • What steps require research?

Problem Breakdown

  • What are you going to use to display a tic tac toe board?
  • How is the user going to fill in the moves?
  • When are you going to check for victory conditions?

Rules

  • X moves first.
  • A piece may be placed on any empty space.
  • A player wins by being the first to connect a line of friendly pieces from one side or corner of the board to the other.
  • The game ends when either one player wins or it is no longer possible for a player to win (in which case the result is a draw).

Stories

  • Clicking New Game starts the game over.
  • When a team wins the game, Alert box announcing which team won, board gets reset.

Stretch

  • Design a computer player that will respond with the ideal move in each situation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment