TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
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.
Reply
Answers (
1
)
Seperate thread invoke problem
Getting Data From a Database to Rich Text Box & Vice Versa