1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
#ifndef NIM_MOVE_HPP
#define NIM_MOVE_HPP

#include <cassert>

class NimMove {
   public:
      NimMove() : resigned(true) {
      }
      NimMove(unsigned int heap, unsigned int count) :
     heap(heap), count(count), resigned(false) {
      }
      bool has_resigned() const {
     return resigned;
      }
      unsigned int get_heap() const {
     assert(!resigned);
     return heap;
      }
      unsigned int get_count() const {
     assert(!resigned);
     return count;
      }

   private:
      unsigned int heap;
      unsigned int count;
      bool resigned;
};

#endif