![]() ![]() ![]() boardProgress? Hell, how's that better than just printBoard()?.Winner()? Capitalized letter means class.Your implementation is tightly coupled with console - what forbids you to implement abstract logic encapsulated in class and USE this class in console app? What if you want to port it to GUI app? Can you do it cheaply now?.Do not force your reader to guess / scroll to get that knowledge. winner = 1 (2, 3) smells bad, using nice constant or enum would improve readability.Do not pollute your namespace by using namespace std.This will only display when the program is first run PlayBall.TG = 0,playBall.T1 = 0,playBall.T2 = 0,playBall.TD = 0 Int player1, player2, draw, player,winner,done I just wanted to post it to see if anyone has any good ideas on how to simplify it, or pointing out any bad practices I have have done. I don't have any questions about this piece of code it compiles just fine in Visual Studio 2010.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |