Пример #1
0
        //Get color of a team
        sf::Color get_team_color(Team t) const
        {
            switch (t.get_t())
            {
                case Team::TEAM_GOOD:
                    return get_friendly();

                case Team::TEAM_BAD:
                    return get_enemy();

                default:
                    return get_neutral();
            }
        }
Пример #2
0
 bool friendly (const Team& team) const
 {
     return team.get_t()==get_t();
 }
Пример #3
0
 bool enemy (const Team& team) const
 {
     return team.get_t()!=get_t();
 }
Пример #4
0
 //Copy constructor
 Team(const Team& t)
 :Team(t.get_t())
 {}