International Journal of Computer Games Technology / 2015 / Article / Alg 8

Research Article

Artificial Intelligence in Video Games: Towards a Unified Framework

Algorithm 8

Modifications in the conceptual copy of a Raven class. No game behavior is defined in CDS, which hosts nothing more than a projection of the game state.
class  Raven_Weapon
{
 //this discharges a projectile from the weapon at the given target position (provided
 the weapon is ready to be discharged… every weapon has its own rate of fire)
virtual void  ShootAt(Vector2D pos) = 0;
void  IncrementRounds(int  num)
 {
  m_iNumRoundsLeft  +=  num;
  Clamp(m_iNumRoundsLeft, 0, m_iMaxRoundsCarried);
  //Synchronize rounds in CDS
  GetCptWeapon()->SetNumRoundsLeft(m_iNumRoundsLeft);
 }
};
class  CptWeapon
{
 ⋯
 //Removed
 //virtual void ShootAt(Vector2D pos) = 0;
void  SetNumRoundsLeft(int  n)
 {
  m_iNumRoundsLeft = n;
 }
 ⋯
};

We are committed to sharing findings related to COVID-19 as quickly as possible. We will be providing unlimited waivers of publication charges for accepted research articles as well as case reports and case series related to COVID-19. Review articles are excluded from this waiver policy. Sign up here as a reviewer to help fast-track new submissions.