// ////////////////////////////////////////////////////////////////////////// // Header file Board.h for class Board // (c)Copyright 2003, Mika Ohtsuki // Created: 2003/05/13 // Modified: $Date: 2003/06/03 20:46:56 $ // ////////////////////////////////////////////////////////////////////////// #ifndef BOARD_H #define BOARD_H #include #include #include enum PointState { NONE, B_BEAN, W_BEAN, B_BUD, W_BUD }; class Board { public: Board(); ~Board(); PointState getState(const unsigned int x, const unsigned int y); std::string toString(); PointState getCurrentBean(); bool tryPlaceBean(const unsigned int x, const unsigned int y); private: PointState *state; PointState currentBean; void setState(const unsigned int x, const unsigned int y, const PointState s); PointState getEnemyBean(); bool tryReverseNext(const unsigned int x, const unsigned int y, const int dx, const int dy); }; #endif