> Thomas Hruska <[email protected]> ha scritto:
>> Asad Abbas wrote:
>> Hi All,
>> i was making "tictac toe" a famous game.
>> 
>> i made it but the following portion of the prog although it works
>> but it does not seems good to me.
>> i wonder if i can do it with some loops or something else...
>> 

> Well, Tic Tac Toe is a simple enough game that a series of if-statements 
> is a generally acceptable solution. If you plan on expanding the game 
> later to support NxN boards, then you would want to consider for-loops, > etc.
>
> -- 
> Thomas Hruska
> CubicleSoft President
> Ph: 517-803-4197

I agree. TicTacToe is very simple. For something more complex, a bidimensional 
array is not a very good design for representing a board game. Consider the use 
of bitboards:

http://en.wikipedia.org/wiki/Bitboard

Luciano






      

Reply via email to