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 [EMAIL PROTECTED] _______________________________________________ Bug-gnubg mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gnubg
