tic-tac-toe

Tic Tac Toe Game Design
Using OOP
By: Parthipan Siva
For: SD121
Identify Objects
•
•
•
•
Tic Tac Toe board
Human Player
Computer Player
Game
Class Relationship
What Information Does The Game
Board Class Need?
• 3 x 3 Matrix for the board
• Status of board
– Can more pieces be placed?
– Has there been a 3 in a row (win)?
What Actions Does The Game
Board Class take?
Class Relationship
What Information Does The Player
Class Need?
• Name
• Piece (X or O)
• Number of Wins
What Actions Does The Player
Class Take?
What Actions Does The Human
Player Class Take?
What Actions Does The Computer
Player Class Take?
Class Relationship
What Information Does The Game
Class Need?
•
•
•
•
•
•
•
Player1
Player2
Game Board
Status
Number of Games Played
Which player move is it
Type of game (Human vs Computer,
Computer vs Human)
What Actions Does The Game
Class Take?