00001
00002
00003
00004
#ifndef __PLAYER_H
00005
#define __PLAYER_H
00006
00007
#include "board.h"
00008
#include "grid.h"
00009
00011
00014 class Player{
00015
protected:
00017 unsigned char plNo;
00019 int data[boardSize];
00020
public:
00022
00025 Player(
unsigned char no):
plNo(no){};
00027
00030 void setData(
int *data){
for (
int i = 0; i < boardSize; i++) this->data[i] = data[i]; };
00032
00037
virtual void getMove(
int *x,
int *y,
Grid &grid) = 0;
00038 };
00039
00041
00044 class HumanPlayer:
public Player{
00046
unsigned char plNo;
00048
int gfx_x;
00050
int gfx_y;
00052
int field_width;
00053
00054
public:
00056
00063
HumanPlayer(
int off_x,
int off_y,
int field_width,
unsigned char no);
00065
00070
virtual void getMove(
int *x,
int *y,
Grid &grid);
00071 };
00072
00074
00077 class AIPlayer:
public Player{
00079
unsigned char plNo;
00080
public:
00082
00085
AIPlayer(
unsigned char no);
00087
00092
virtual void getMove(
int *x,
int *y,
Grid &grid);
00093 };
00094
00095
#endif