AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
objectives/Objective.cpp
- Committer:
- sillevl
- Date:
- 2017-02-09
- Revision:
- 27:f29805113454
- Parent:
- 24:f0989eca7469
File content as of revision 27:f29805113454:
#include "Objective.h"
#include "../games/Game.h"
Objective::Objective(Game* game){
this->game = game;
Board* board = game->getBoard();
lcd = board->lcd;
leds = board->leds;
key = board->key;
button = board->button;
keyboard = board->keyboard;
buzzer = board->buzzer;
status = WAITING;
}
Objective::Status Objective::getStatus(){
return status;
}
void Objective::start(){
while(status != COMPLETED){
run();
leds->on(Leds::LEFT);
}
}
void Objective::complete(){
status = COMPLETED;
leds->off(Leds::RIGHT);
}
