F D

F D

  • NA
  • 45
  • 81.1k

Console Game App - Tic Tac Toe

Mar 15 2011 5:40 PM
Hey Guys,

I'm trying to do some OOP programming and I am not quite sure if I'm going in the right direction.

I was writing TicTacToe program (Console App) and wanted to know your opinion. I'm not quite done yet, but would definitely

appreciate some feedback. 

First -any ideas as to how I can make this code better or efficient. Please point me in the right direction!

Second - Do I have the right idea as far as OOP.
 Class name - Game
   Member Vairables - X & Y coordinates, two dimensional array, and 2 constants (player1 = 'X' , player2 = 'O') 
  Methods - Player1_Move, Player2_Move, DisplayMoveOnGrid, CheckForWinner 

 Main Program - One object of type Game is created.

Third - How would I go about creating a computer move. A move that is randomoly generated. What should I be thinking?

The entire source code is attached. 

As always your time and input is greatly appreciated. 

Thanks.

Fabe.
 

Answers (1)