movelist.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* This file contains move-list structures for CHESS.
  2. Copyright (C) 1986 Free Software Foundation, Inc.
  3. This file is part of CHESS.
  4. CHESS is distributed in the hope that it will be useful,
  5. but WITHOUT ANY WARRANTY. No author or distributor
  6. accepts responsibility to anyone for the consequences of using it
  7. or for whether it serves any particular purpose or works at all,
  8. unless he says so in writing. Refer to the CHESS General Public
  9. License for full details.
  10. Everyone is granted permission to copy, modify and redistribute
  11. CHESS, but only under the conditions described in the
  12. CHESS General Public License. A copy of this license is
  13. supposed to have been given to you along with CHESS so you
  14. can know your rights and responsibilities. It should be in a
  15. file named COPYING. Among other things, the copyright notice
  16. and this notice must be preserved on all copies. */
  17. /*
  18. * Movelist.h -- structure of a move list, game list
  19. */
  20. #define M_KCASTLE 1 /* A King-side castle */
  21. #define M_QCASTLE 2 /* A Queen-side castle */
  22. #define M_PROMOTE 4 /* A Promotion */
  23. #define M_ENPASS 8 /* An Enpassant */
  24. struct mvlist {
  25. int from; /* Origination square */
  26. int to; /* Destination square */
  27. int movpiece; /* Moving piece */
  28. int cappiece; /* Captured piece */
  29. int capcount; /* Count of moves by captured piece */
  30. int propiece; /* Promoted to this */
  31. int score; /* Rating of move */
  32. char flags; /* Associated flags above */
  33. };
  34. struct gmlist {
  35. int depth; /* Depth searched to */
  36. long nodes; /* Number of nodes searched */
  37. int score; /* Score of position */
  38. float cpu; /* Cpu used */
  39. float rate; /* Nodes searched per second */
  40. struct mvlist move; /* Associated move list */
  41. };