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

📄 teamstates.h

📁 用人工智能实现的足球机器人人仿真比赛的程序
💻 H
字号:
#ifndef TEAMSTATES_H
#define TEAMSTATES_H
//------------------------------------------------------------------------
//
//  Name: TeamStates.h
//
//  Desc: State prototypes for soccer team states
//
//  Author: Mat Buckland 2003 (fup@ai-junkie.com)
//
//------------------------------------------------------------------------
#include <string>

#include "FSM/State.h"
#include "Messaging/Telegram.h"


class SoccerTeam;





//------------------------------------------------------------------------
class Attacking : public State<SoccerTeam>
{ 
private:
  
  Attacking(){}

public:

  //this is a singleton
  static Attacking* Instance();

  void Enter(SoccerTeam* team);

  void Execute(SoccerTeam* team);

  void Exit(SoccerTeam* team);

  bool OnMessage(SoccerTeam*, const Telegram&){return false;}
};

//------------------------------------------------------------------------
class Defending : public State<SoccerTeam>
{ 
private:
  
  Defending(){}

public:

    //this is a singleton
  static Defending* Instance();

  void Enter(SoccerTeam* team);

  void Execute(SoccerTeam* team);

  void Exit(SoccerTeam* team);

  bool OnMessage(SoccerTeam*, const Telegram&){return false;}
};

//------------------------------------------------------------------------
class PrepareForKickOff : public State<SoccerTeam>
{ 
private:
  
  PrepareForKickOff(){}

public:

    //this is a singleton
  static PrepareForKickOff* Instance();
  
  void Enter(SoccerTeam* team);

  void Execute(SoccerTeam* team);

  void Exit(SoccerTeam* team);

  bool OnMessage(SoccerTeam*, const Telegram&){return false;}
};


#endif

⌨️ 快捷键说明

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