Coordinator v2

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

includes/GameModes/SpeedMode.hpp

Committer:
Ismael Balafrej
Date:
2017-04-11
Revision:
3:501120a68c11
Parent:
1:e1c5259b7d9a

File content as of revision 3:501120a68c11:

#pragma once
#include "GameMode.hpp"

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