Help me please :S
Hi everyone,i'm Alexandra,from Greece.
My problem is;
Computer and user will play one by one in my programme game.
how can i do this ? how can i use for loop about of that ? thank you so much
July 11th, 2013, 06:40 AM
Do you mean that you are writing a game, where the user plays against the computer, like chess?
In that case you must write code that just takes input from you,
but that can turn sides for the computer:
the computer must choose the best action (or move) by observing
all counter attacks, then again it must turn sides for every
action generated to compute counter attacks again.
This all until a certain DEPTH, otherwise it would never end.
Of course computed attacks have a different value than
counter attacks: with chess: mate by one side or mate by the other side.
Anyway: so work all those games.
Originally Posted by alexandraivana