It's been a while since I coded this, but ever since I did, I've wondered how efficient it is. I'm pretty good at getting what I want done in a GUI or app, but efficiency is my enemy.
Pente is a game where you try and place five stones in a row, horizontally, vertically, or diagonally. You can also make jumps if the stones look like this:
OXX
I'm O's, and I put an O here:
OXXO
I get to take the two X's and it ends up looking like this:
O O
Again, this can happen in any direction, has to be a pair. If a player captures a total of five pairs, or gets five of his pieces in a row, he wins.
pente.zip
I used recursion, it was the simplist way I could think of. Any comments?
(The game is fun, you guys should run it and check it out)
Pente is a game where you try and place five stones in a row, horizontally, vertically, or diagonally. You can also make jumps if the stones look like this:
OXX
I'm O's, and I put an O here:
OXXO
I get to take the two X's and it ends up looking like this:
O O
Again, this can happen in any direction, has to be a pair. If a player captures a total of five pairs, or gets five of his pieces in a row, he wins.
pente.zip
I used recursion, it was the simplist way I could think of. Any comments?
(The game is fun, you guys should run it and check it out)







Comment