tavli

view src/board.h @ 10:fc5c68da7906

added readme and license
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 26 Jun 2015 05:41:18 +0300
parents b41ceead1708
children 16a420432aa3
line source
1 #ifndef BOARD_H_
2 #define BOARD_H_
4 #include <vector>
5 #include "object.h"
6 #include "image.h"
8 #define NUM_SLOTS 24
9 #define MAX_PUCKS 30
11 enum { EMPTY = 0, MINE, OTHER };
13 class Board {
14 private:
15 int slots[NUM_SLOTS][MAX_PUCKS];
16 std::vector<Object*> obj;
17 Object *puck_obj;
19 Image img_wood, img_field, img_hinge;
21 bool generate();
22 bool generate_textures();
24 public:
25 Board();
26 ~Board();
28 bool init();
29 void destroy();
31 void clear();
33 void draw() const;
34 };
36 #endif // BOARD_H_