piece.h

来自「MONA是为数不多的C++语言编写的一个很小的操作系统」· C头文件 代码 · 共 35 行

H
35
字号
#ifndef __REVERSI_PIECE_H__#define __REVERSI_PIECE_H__#include <gui/System/Mona/Forms/Control.h>using namespace System;using namespace System::Drawing;using namespace System::Mona::Forms;class Piece : public Control{protected:    int state;    int x;    int y;    _P<Bitmap> white;    _P<Bitmap> black;public:    Piece();    Piece(int state, int x, int y, _P<Bitmap> white, _P<Bitmap> black);    virtual ~Piece();    virtual void SetState(int state) { this->state = state; this->Refresh(); }    virtual int GetState() const { return this->state; }    virtual int GetX() const { return this->x; }    virtual int GetY() const { return this->y; }protected:    virtual void OnPaint();    virtual void OnMouseUp(_P<MouseEventArgs> e);};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?