~ubuntu-branches/ubuntu/raring/qgo/raring

« back to all changes in this revision

Viewing changes to src/stone.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2005-01-01 23:07:10 UTC
  • Revision ID: james.westby@ubuntu.com-20050101230710-fhng6yidm47xlb2i
Tags: upstream-1.0.0-r2
ImportĀ upstreamĀ versionĀ 1.0.0-r2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* stone.h
 
3
*/
 
4
 
 
5
#ifndef STONE_H
 
6
#define STONE_H
 
7
 
 
8
#include "defines.h"
 
9
#include <qcanvas.h>
 
10
 
 
11
class Stone : public QCanvasSprite
 
12
{
 
13
public:
 
14
        Stone(QCanvasPixmapArray *a, QCanvas *canvas, StoneColor c, int x, int y, int numberOfImages=8);
 
15
        ~Stone() {}
 
16
        
 
17
        StoneColor getColor() const { return color; }
 
18
        void setColor(StoneColor c=stoneBlack);
 
19
  void toggleOneColorGo(bool oneColor) ;
 
20
        int rtti() const { return RTTI_STONE; }
 
21
        int posX() const { return myX; }
 
22
        int posY() const { return myY; }
 
23
        void setPos(int x, int y) { myX = x; myY = y; }
 
24
        bool isDead() const { return dead; }
 
25
        void setDead(bool b=true) { dead = b; seki = false;}
 
26
        bool isSeki() const { return seki; }
 
27
        void setSeki(bool b=true) { seki = b; dead = false; }
 
28
        
 
29
        bool checked;
 
30
        
 
31
private:
 
32
        StoneColor color;
 
33
        int myX, myY;
 
34
        bool dead, seki;
 
35
};
 
36
 
 
37
#endif