effector.cpp
来自「巫魔问题求解」· C++ 代码 · 共 64 行
CPP
64 行
#include "Effector.h"
#include <Wum_Server/src/AlgorithmInterface.h>
using namespace _server;
using namespace _algorithm;
///////////////////////////////////
Effector::Effector(AlgorithmInterface &ai)
{
this->mpAI = &ai;
}
///////////////////////////////////
Effector::Effector(const Effector &from)
{
}
///////////////////////////////////
Effector::~Effector(void)
{
}
///////////////////////////////////
bool Effector::Escape(void)
{
return this->TheAlgorithmInterface().TheClientToServer().Escape();
}
///////////////////////////////////
bool Effector::GoAhead(void)
{
return this->TheAlgorithmInterface().TheClientToServer().GoAhead();
}
///////////////////////////////////
bool Effector::TurnLeft(void)
{
return this->TheAlgorithmInterface().TheClientToServer().TurnLeft();
}
///////////////////////////////////
bool Effector::TurnRight(void)
{
return this->TheAlgorithmInterface().TheClientToServer().TurnRight();
}
///////////////////////////////////
bool Effector::Shoot(void)
{
return this->TheAlgorithmInterface().TheClientToServer().Shoot();
}
///////////////////////////////////
AlgorithmInterface &Effector::TheAlgorithmInterface(void)
{
return *this->mpAI;
}
///////////////////////////////////
const AlgorithmInterface &Effector::GetAlgorithmInterface(void) const
{
return *this->mpAI;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?