NerfUS game coordinator for the Nerf gun firing range

Dependencies:   HardwareInterface mbed-rtos mbed

Fork of NerfUS by NerfUS

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Target.hpp Source File

Target.hpp

00001 #ifndef TARGET_HPP
00002 #define TARGET_HPP
00003 
00004 enum TargetType
00005 {
00006     TARGET_TYPE_ALLY,
00007     TARGET_TYPE_ENEMY
00008 };
00009 
00010 struct TargetInfo
00011 {
00012     int id;
00013     TargetType type;
00014     int timeout_ms;
00015 
00016     void riseTarget(); //TODO
00017 
00018     bool operator==(const TargetInfo& other) const
00019     {
00020         return (id == other.id)
00021             && (type == other.type)
00022             && (timeout_ms == other.timeout_ms);
00023     }
00024 };
00025 
00026 TargetInfo make_TargetInfo(int id, TargetType type, int timeout_ms);
00027 
00028 #endif
00029