[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] documentation: algorithm for calculating "must use both
From: |
Jim Segrave |
Subject: |
Re: [Bug-gnubg] documentation: algorithm for calculating "must use both die" |
Date: |
Wed, 9 Aug 2006 07:32:39 +0200 |
User-agent: |
Mutt/1.4.2.1i |
On Wed 19 Jul 2006 (10:42 -0400), Kenny Rosenblatt wrote:
> Hello,
>
>
>
> Can anyone point me in the right place in the GNU backgammon source or
> anywhere else that will help show me the algorithm used when a player has
> the ability to use both dice, but attempted to use only one? I am trying
> to prevent someone from making a move with only one die when there is a move
> available that would use both. Any suggestions or links are appreciated.
>
>
> Thanks
>
> Kenny
eval.c has the routine GenerateMoves() which creates a list of all the
legal moves for a given postiion and dice roll. After that, gnubg
checks that the entered move is a valid one. (more specifically, it
take the board postion after a player has made a move and compares it
to the resulting positions from all legal moves - if it's one of them,
it's OK, otherwise the move is rejected.
--
Jim Segrave address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Bug-gnubg] documentation: algorithm for calculating "must use both die",
Jim Segrave <=