Hey, thanks for the response.

'any-legall-move?' is used to determine if the player has any legal moves, 
if not then it's the other player's turn; if neither has any legal moves 
then the game is over. So when it is called the 'desired move' is unknown.

Similarly 'legal-moves' is used before you know the 'desired move':

- That method is as part of the random strategy: the move is selected 
randomly from the set of possible moves.
- Later it's used as part of the human strategy to display all the possible 
legal moves before the human player chooses their move.

A lot of the inefficiencies will disappear with memoisation.

On Monday, December 16, 2013 8:12:21 PM UTC, Sean Chalmers wrote:
>
>
> Unless I'm reading it wrong, you traverse the entire board to locate legal 
> moves for the player, given you know the calculations required to move in 
> each direction, wouldn't it be simply to start from the desired move and 
> determine the valid moves that way? Different strokes for different folks, 
> obviously, but just seems unnecessary. :)
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to