AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

objectives/Objective.cpp

Committer:
sillevl
Date:
2015-05-24
Revision:
24:f0989eca7469
Parent:
23:eb5a5da6e83f
Child:
27:f29805113454

File content as of revision 24:f0989eca7469:


#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();
    }
}

void Objective::complete(){
    status = COMPLETED;
}