Yes, and the idea isn't difficult, but can be computationally
expensive. Generate a tree of possible moves and number them
recursively, starting with 0 at the leaves of the tree (note the
leaves are winning positions as there are no further moves). Then work
back up the tree numbering each level
FWIW if have written some AS2 classes some time ago that implement a graph
by using adjacenty lists.
If it would help you let me know
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Weldon
MacDonald
Sent: Thursday, May 11, 2006 2:49 PM
To: Flashcoders
My first thought was an adjacency list with something to indicate
forbidden edges (for a dot inside a cycle), so it might help. The
problem isn't that simple though, as more and more moves are made
whose in what cycle and can make waht move is a good deal less than
clear.
On 5/12/06, André
(I am re-sending this message - somehow, I got a disk full error message
from the flashcoders server)
--
Not sure what you mean by: How do you tell when a dot has been encircled
by a line? I do not understand why we need to keep track of cycles? What
is the relation with your
The reqiurement is that the software be able to play the game, so I
need a data structure to store the game position for analysis. The
intersection check is moot until I can store the current state of the
game, update it, and analyze the potential moves.
If moves are made that create a cycle,
oh my apologies, I really did not realize that you had to implement an
actual player and thus do all the AI. Actually had no clue about what this
game really looked like. I understand it a bit better now: The game plays
with 2 players, lines are not straight, new dots can be placed anywhere on
6 matches
Mail list logo