Coordinator v2

Dependencies:   NerfUSXbee PinDetect EthernetInterface JSON MFRC522 WebSocketClient mbed-rtos mbed

includes/GameModes/ReflexMode.hpp

Committer:
Ismael Balafrej
Date:
2017-04-11
Revision:
3:501120a68c11
Parent:
2:019d8848cf7e

File content as of revision 3:501120a68c11:

#pragma once
#include "GameMode.hpp"

class ReflexMode : public GameMode
{
  public:
    using GameMode::GameMode;
    Target* GetNextTarget()
    {
      return GetRandomTarget();
    }
    void OnTargetHit(int timeTaken)
    {
      stats.targets++;
      stats.score += 2;
    }
    void OnTargetMiss()
    {
      stats.score -= 1;
    }  
    int getTimeBetweenTargets()
    {
      return (rand() % 3000) + 1000;
    }
};