NerfUS game coordinator for the Nerf gun firing range

Dependencies:   HardwareInterface mbed-rtos mbed

Fork of NerfUS by NerfUS

include/Target.hpp

Committer:
Ismael Balafrej
Date:
2017-03-17
Branch:
PlayableGame
Revision:
17:48474266a361
Parent:
16:5e6c695468b6
Child:
18:469c8b2a9af9

File content as of revision 17:48474266a361:

#ifndef TARGET_HPP
#define TARGET_HPP

enum TargetType
{
    TARGET_TYPE_ALLY,
    TARGET_TYPE_ENEMY
};

struct TargetInfo
{
    int id;
    TargetType type;
    int timeout_ms;

    void riseTarget();

    bool operator==(const TargetInfo& other) const
    {
        return (id == other.id)
            && (type == other.type)
            && (timeout_ms == other.timeout_ms);
    }
};

TargetInfo make_TargetInfo(int id, TargetType type, int timeout_ms);

#endif