Скачиваний:
16
Добавлен:
01.05.2014
Размер:
1.35 Кб
Скачать
// Rifleman.h: interface for the CRifleman class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RIFLEMAN_H__721EA502_132E_11D2_A243_B52D916E203E__INCLUDED_)
#define AFX_RIFLEMAN_H__721EA502_132E_11D2_A243_B52D916E203E__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <vector>
using namespace std;

extern LArc RiflemanTBL[];
class CRifleman : public LFsaAppl  
{
public:
	int GetNumber();
	void SetNumber(int n);
	void SetLink(LFsaAppl *pFsaLeft, LFsaAppl *pFsaRigtht);
	LFsaAppl *pFsaRightMan;
	LFsaAppl *pFsaLeftMan;
	CRifleman();
	CRifleman(int n, TNetFsa *pNetFsa, LArc *pTBL=RiflemanTBL);
	virtual ~CRifleman();
	bool operator==(const CRifleman &var) const;

protected:
	int x1();		//	Is fire?
	int x2();		//	Is ready?
	int x3();		//	Number is equal to zero? Shot!
	int x4();		//	
	void y1();		//	To place number.
	void y2();		//	To reduce number by unit.
	void y3();		//	Gunshot
	void y4();		//	
	void y5();		//	

	int	nNumber;
	int	nSaveNumber;
	int nLengthQueue;	//	Length of queue.
	int nCurrentQueue;	//
	long	lDelay;

};

typedef vector<CRifleman*> TIArrayRifleman;
typedef vector<CRifleman*>::iterator TIIteratorRifleman;
#endif // !defined(AFX_RIFLEMAN_H__721EA502_132E_11D2_A243_B52D916E203E__INCLUDED_)
Соседние файлы в папке Shot