Updated previous code
Printable View
Updated previous code
is there a way to simply the AI of the computer in this program? instead of using alot of ifs... i could use switch but it would still be bulky and repetitive.
If a function takes no arguments, specify this with (void) instead of (), as in:
Due to historical reasons, () means "unspecified number of arguments", not "no arguments"; (void) means "no arguments". Using (void) allows for proper type-checking.Code:void f(void);
> is there a way to simply the AI of the computer in this program?
Are you making use of the symmetry in the problem?
X - -
0 - -
X - -
X 0 X
- - -
- - -
- - X
- - 0
- - X
- - -
- - -
X 0 X
From a strategy point of view, all of these board positions are the same.
Can you guys recommend another game to make? i done this one and a blackjack game..
trying to learn C and it seems like games are a good way to do so
Minesweeper. That requires a variation of an area-filling algorithm, which is fairly easy to do recursively.