Main Page | Class Hierarchy | Class List | File List | Class Members

board.h

00001 //--------------------------------------------------------------------------- 00002 // board 00003 //--------------------------------------------------------------------------- 00004 #ifndef __BOARD_H 00005 #define __BOARD_H 00006 00007 #include <allegro.h> 00008 #include <vector> 00009 using namespace std; 00010 00011 00013 const int boardWidth = 8; 00015 const int boardHeight = 8; 00017 const int boardSize = boardWidth * boardHeight; 00018 00020 class Board{ 00021 public: 00023 00028 int map[boardWidth * boardHeight]; 00030 00033 Board(); 00035 00039 Board(int *map); 00041 00048 Board(int *map, int x, int y, int n); 00049 00051 00057 int get(int x, int y); 00058 00060 00066 void set(int x, int y, int n); 00067 00069 00074 vector<Board> possible_moves(int pl_no); 00075 00077 00082 void move(int pl_no); 00083 00084 00086 00093 void draw(BITMAP *b, int off_x, int off_y, int field_width); 00095 00098 bool operator==(Board &b); 00099 00101 00107 int depthSearchScore(unsigned char pl, int moveAt); 00109 00114 int minimaxABScore(unsigned char pl); 00116 00123 bool isLegalMove(int px, int py, int pl_no); 00125 00129 bool final(); 00130 00132 00135 void print(); 00136 }; 00137 00138 00139 00140 #endif

Generated on Fri May 14 02:44:24 2004 for Reversi by doxygen 1.3.7