source: trunk/monsterz/board.h @ 314

Last change on this file since 314 was 314, checked in by sam, 10 years ago

Board size and number of available pieces is now a parameter of
the Board class ctor.

  • Property svn:keywords set to Id
File size: 922 bytes
Line 
1//
2// Monsterz
3//
4// Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11//
12// The Board class
13// ---------------
14//
15
16#if !defined __MONSTERZ_BOARD_H__
17#define __MONSTERZ_BOARD_H__
18
19#include "monsterz.h"
20
21class BoardData;
22
23class Board : public WorldEntity
24{
25public:
26    Board(int2 dim, int npieces);
27    virtual ~Board();
28
29protected:
30    virtual void TickGame(float deltams);
31    virtual void TickDraw(float deltams);
32
33    void Fill();
34    void Switch(int2 cell_a, int2 cell_b);
35    int ListMashes(int list[MAX_WIDTH][MAX_HEIGHT]);
36    int ListMoves(int list[MAX_WIDTH][MAX_HEIGHT]);
37
38private:
39    BoardData *data;
40};
41
42#endif // __MONSTERZ_BOARD_H__
43
Note: See TracBrowser for help on using the repository browser.