Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tic Tac Toe Game Design Using OOP

Similar presentations


Presentation on theme: "Tic Tac Toe Game Design Using OOP"— Presentation transcript:

1 Tic Tac Toe Game Design Using OOP
By: Parthipan Siva For: SD121

2 Identify Objects Tic Tac Toe board Human Player Computer Player Game
Ask Class to identify objects. HINT: Objects == nouns <- this can be overused if people are not careful ALSO you can have abstract objects which are not nouns

3 Class Relationship Show the class my class relationships.
Comment on the difference between “Is a” and “Has a” Get Class to come up with reasons for creating a parent player class.

4 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)? Ask class to come up with Member Variables for Board Class. Show what I decided to use.

5 What Actions Does The Game Board Class take?
Ask class to come up with the (public) member functions for the game board class.

6 Class Relationship

7 What Information Does The Player Class Need?
Name Piece (X or O) Number of Wins Ask class to come up with Member Variables for Player Class. Show what I decided to use.

8 What Actions Does The Player Class Take?
Ask class to come up with the (public) member functions for the player class.

9 What Actions Does The Human Player Class Take?
Ask class to come up with the (public) member functions for the Human Player class.

10 What Actions Does The Computer Player Class Take?
Ask class to come up with the (public) member functions for the Computer Player class.

11 Class Relationship

12 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) Ask class to come up with Member Variables for Game Class. Show what I decided to use.

13 What Actions Does The Game Class Take?
Ask class to come up with the (public) member functions for the Game class.


Download ppt "Tic Tac Toe Game Design Using OOP"

Similar presentations


Ads by Google