39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
|
|
#ifndef HW4_STRATEGIC_PLAYER_H
|
|
#define HW4_STRATEGIC_PLAYER_H
|
|
|
|
#include "common.h"
|
|
#include "board.h"
|
|
#include "player.h"
|
|
|
|
class StrategicPlayer: public IPlayer {
|
|
char name;
|
|
char box_name;
|
|
|
|
Board board;
|
|
public:
|
|
string PlayerInfo();
|
|
// Init(const int,const int) will be called before playing the game
|
|
// You can create your own data-structure
|
|
void Init
|
|
( int board_rows // the size of board (including dots, lines, and boxes)
|
|
, int board_cols // the size of board (including dots, lines, and boxes)
|
|
, char box_type // the character for the player's boxes
|
|
, char line_type // the character for the player's lines
|
|
);
|
|
// Close() will be called after finishing playing the game
|
|
// You can remove all dynamically allocated memories
|
|
void Close();
|
|
// EventAddLine() and EventAddBox() will be called
|
|
// when a player adds a line or when a system assign a box's owner
|
|
void EventAddLine(char bar, const Loc& loc);
|
|
void EventAddBox (char box, const Loc& loc);
|
|
// Loc SelectLineLocation() will be called
|
|
// when the game system ask where your player want to add a line
|
|
Loc SelectLineLocation();
|
|
|
|
~StrategicPlayer();
|
|
};
|
|
|
|
#endif //HW4_STRATEGIC_PLAYER_H
|