Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // player.h
- #ifndef PLAYER_H_
- #define PLAYER_H_
- #include <string>
- #include "board.h"
- #include "gamedata.h"
- class Player {
- public:
- virtual ~Player() {}
- virtual Move getMove(Board &c) { return std::make_pair(std::make_pair('c', 5), std::make_pair('f', 2)); }
- virtual GameData::Move getMove(Board &c) { return std::make_pair(std::make_pair('c', 5), std::make_pair('f', 2)); }
- };
- #endif /* PLAYER_H_ */
- // gamedata.h
- #ifndef GAMEDATA_H_
- #define GAMEDATA_H_
- #include <utility>
- #include "player.h"
- class Player;
- namespace GameData {
- enum Color {
- BLACK = 0,
- WHITE = 1
- };
- typedef typename std::pair<char, int> Position;
- typedef typename std::pair< std::pair<char, int>, std::pair<char, int> > Move;
- typedef typename std::pair<Player*, Player*> Players;
- };
- #endif /* GAMEDATA_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement