AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

objectives/Objective.cpp

Committer:
sillevl
Date:
2015-05-23
Revision:
14:e0bfee0a5e66
Parent:
13:ece97a1108cc
Child:
15:78116b7254d5

File content as of revision 14:e0bfee0a5e66:


#include "Objective.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;
}