Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Functions
race.cpp File Reference
#include "race.h"
#include <algorithm>
#include <cassert>
#include <iostream>
#include <sstream>
#include "../magic_enum/include/magic_enum/magic_enum.hpp"
Include dependency graph for race.cpp:

Functions

std::vector< raceget_all_races () noexcept
 
double get_attack_speed (const race r) noexcept
 Get the attack speed of a race.
 
double get_max_health (const race r)
 Get the maximum health for a piece.
 
double get_max_shield (const race r)
 Get the maximum shield value for a piece.
 
double get_movement_speed (const race r) noexcept
 Get the movement speed of a race.
 
race get_next (const race r) noexcept
 
race get_previous (const race r) noexcept
 
void test_race ()
 Test the race functions.
 
std::string to_human_str (const race c) noexcept
 
std::string to_str (const race c) noexcept
 
std::ostream & operator<< (std::ostream &os, const race c) noexcept
 

Function Documentation

◆ get_all_races()

std::vector< race > get_all_races ( )
noexcept

◆ get_attack_speed()

double get_attack_speed ( const race  r)
noexcept

Get the attack speed of a race.

The value of 1.0 is the baseline.

◆ get_max_health()

double get_max_health ( const race  r)

Get the maximum health for a piece.

◆ get_max_shield()

double get_max_shield ( const race  r)

Get the maximum shield value for a piece.

◆ get_movement_speed()

double get_movement_speed ( const race  r)
noexcept

Get the movement speed of a race.

The value of 1.0 is the baseline.

◆ get_next()

race get_next ( const race  r)
noexcept

◆ get_previous()

race get_previous ( const race  r)
noexcept

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const race  c 
)
noexcept

◆ test_race()

void test_race ( )

Test the race functions.

◆ to_human_str()

std::string to_human_str ( const race  c)
noexcept

◆ to_str()

std::string to_str ( const race  c)
noexcept