tavli

annotate 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
rev   line source
nuclear@0 1 #ifndef BOARD_H_
nuclear@0 2 #define BOARD_H_
nuclear@0 3
nuclear@1 4 #include <vector>
nuclear@2 5 #include "object.h"
nuclear@4 6 #include "image.h"
nuclear@0 7
nuclear@0 8 #define NUM_SLOTS 24
nuclear@0 9 #define MAX_PUCKS 30
nuclear@0 10
nuclear@0 11 enum { EMPTY = 0, MINE, OTHER };
nuclear@0 12
nuclear@0 13 class Board {
nuclear@0 14 private:
nuclear@0 15 int slots[NUM_SLOTS][MAX_PUCKS];
nuclear@2 16 std::vector<Object*> obj;
nuclear@2 17 Object *puck_obj;
nuclear@1 18
nuclear@7 19 Image img_wood, img_field, img_hinge;
nuclear@4 20
nuclear@1 21 bool generate();
nuclear@4 22 bool generate_textures();
nuclear@0 23
nuclear@0 24 public:
nuclear@0 25 Board();
nuclear@0 26 ~Board();
nuclear@0 27
nuclear@0 28 bool init();
nuclear@0 29 void destroy();
nuclear@0 30
nuclear@0 31 void clear();
nuclear@0 32
nuclear@0 33 void draw() const;
nuclear@0 34 };
nuclear@0 35
nuclear@0 36 #endif // BOARD_H_