squirmcellproperties.h

来自「本程序模拟细胞的自我繁殖」· C头文件 代码 · 共 42 行

H
42
字号
// SquirmCellProperties.h

#pragma once

enum TStyle { NEUTRAL,HYDROPHOBIC,HYDROPHILIC,WATER };

class SquirmCellProperties
{
public:

	TStyle style;

    SquirmCellProperties(char t,int s);

    char GetType() { return this->type; } 
    int GetState() { return this->state; }

    void SetState(int s) { 
		this->state=s; 
		RecomputeStyle();
	}

    void SetType(char t)
    {
        this->type = t;
        RecomputeStyle();
    }

    COLORREF GetColour();

    static char GetRandomType();

    static void EIGHT(int i,int &x,int &y);
    static void FOUR(int i,int &x,int &y);

protected:

    char type;
    int state;

	void RecomputeStyle();
};

⌨️ 快捷键说明

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