Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

moves.c

Go to the documentation of this file.
00001 /*************************************************************************
00002 *   FILE: moves.c
00003 * AUTHOR: CAL
00004 * DATE: 29 April 1993
00005 * PURPOSE:
00006 **************************************************************************/
00007 
00008 #include "moves.h"
00009 
00010 
00011 void MoveList::Insert (Move *a)
00012 {
00013   a->Next = First;
00014   First = a;
00015   Len++;
00016   if (!Current)
00017     Current = First;
00018   if (!Last)
00019     Last = First;
00020 }
00021 
00022 void MoveList::Append (Move *a)
00023 {
00024   if (Last)
00025   {
00026     Last->Next = a;
00027     Last = a;
00028     Len++;
00029   }
00030   else
00031     Insert (a);
00032 }
00033 
00034 
00035 bool MoveList::Reset (void)
00036 {
00037   Current = First;
00038   return (bool) (Current);
00039 }
00040 
00041 
00042 bool MoveList::Next (void)
00043 {
00044   if (Current)
00045     Current = Current->Next;
00046   return (bool) (Current);
00047 }
00048 
00049 void MoveList::Nuke (void)
00050 {
00051   delete First;
00052   First = Current = Last = 0;
00053   Len = 0;
00054 }

Generated on Sun Jul 6 23:07:15 2003 for Scotland Yard by doxygen1.2.15