⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 russionblock.h

📁 有计算机图形学、图像处理、dbms、sniffer、中游俄罗斯外挂、othello、遗传算法、舌苔分析等程序。
💻 H
字号:
// RussionBlock.h: interface for the CRussionBlock class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RUSSIONBLOCK_H__874E12A1_1303_11D8_A2AD_00055DE8A3EF__INCLUDED_)
#define AFX_RUSSIONBLOCK_H__874E12A1_1303_11D8_A2AD_00055DE8A3EF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Macro.h"


struct TYPE
{
	BOOL m_bt;
	BOOL m_bs;

	TYPE()
	{
		m_bt=0;
		m_bs=0;
	}
    TYPE(BOOL bt,BOOL bs)
	{
		m_bt=bt;
		m_bs=bs;
	}
};

struct DOWNKEY
{
	int nMov;
	unsigned int udown;
	DOWNKEY* next;//只用于链表分配
};

class CRussionBlock  
{
	BOOL m_btype;//0--6
	BOOL m_bstatus;
	BOOL m_bpaste;
	static DOWNKEY *button[COL_BLOCK_COUNT];
	static DOWNKEY dk[ROW_BLOCK_COUNT];
	static DOWNKEY downkey[ROW_BLOCK_COUNT];
public:
    POS m_pos[4];
	POS m_oldpos[4];
public:
	BOOL Move(int nMove);
	void GetDownInfo(BOOL bAtk,UINT top[ROW_BLOCK_COUNT+2]
		,DOWNKEY downkey[ROW_BLOCK_COUNT],int& nScope);
	void GetDownInfo2(BOOL bAtk,UINT top[ROW_BLOCK_COUNT+2]
		,DOWNKEY downkey[ROW_BLOCK_COUNT],int& nScope);
	BOOL GetStatus();
	int _Atk(BYTE Face[][ROW_BLOCK_COUNT+2]
		,UINT top[ROW_BLOCK_COUNT+2],int& nMove,int& nClrNum,BYTE clr[4]);
	int _Atk1(BYTE Face[][ROW_BLOCK_COUNT+2],DOWNKEY downkey[ROW_BLOCK_COUNT],int nScope
		,UINT top[ROW_BLOCK_COUNT+2],int& nMove,int& nClrNum,BYTE clr[4]);
	int Attack(BYTE Face[][ROW_BLOCK_COUNT+2],UINT top[ROW_BLOCK_COUNT+2]
		,UINT uitop,int& nMove,int& nClrNum,BYTE clr[4]);
	int Attack1(BYTE Face[][ROW_BLOCK_COUNT+2],UINT top[ROW_BLOCK_COUNT+2]
		,UINT uitop,int& nMove,int& nClrNum,BYTE clr[4]);
	int Attack2(BYTE Face[][ROW_BLOCK_COUNT+2],UINT top[ROW_BLOCK_COUNT+2]
		,UINT uitop,int& nMove,int& nClrNum,BYTE clr[4]);
	BOOL Rotation();
	BOOL operator ==(const CRussionBlock &block);
	CRussionBlock & operator =(const CRussionBlock& block);
	int GetScore(BYTE Face[][ROW_BLOCK_COUNT+2]
				, UINT top[ROW_BLOCK_COUNT+2],int& nMove,int& nClrNum,BYTE clr[4]);
	int GetScore1(BYTE Face[][ROW_BLOCK_COUNT+2],DOWNKEY downkey[ROW_BLOCK_COUNT],int nScope
				, UINT top[ROW_BLOCK_COUNT+2],int& nMove,int& nClrNum,BYTE clr[4]);
	CRussionBlock(const CRussionBlock &block);
	int Fitness(BYTE Face1[][ROW_BLOCK_COUNT+2]
		,UINT top[ROW_BLOCK_COUNT+2],UINT uitop,int& nMove);
	int GetType()
	{
		return m_btype;
	}
	BOOL GoRight(BYTE Face[][ROW_BLOCK_COUNT+2]);
	BOOL GoLeft(BYTE Face[][ROW_BLOCK_COUNT+2]);
	BOOL Down(BYTE Face[][ROW_BLOCK_COUNT+2]);
	void Rot6();
	void Rot5();
	void Rot4();
	void Rot3();
	void Rot2();
	BOOL CheckBump(BYTE Face[][ROW_BLOCK_COUNT+2]);
	void Rot1();
	CRussionBlock();
	CRussionBlock(int ntype,int nstatus);
	virtual ~CRussionBlock();

private:
	int CutOff();
	int Sort(BYTE clr[4]);
};

#endif // !defined(AFX_RUSSIONBLOCK_H__874E12A1_1303_11D8_A2AD_00055DE8A3EF__INCLUDED_)

⌨️ 快捷键说明

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