AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

objectives/Objective.cpp

Committer:
sillevl
Date:
2015-05-24
Revision:
23:eb5a5da6e83f
Parent:
16:e8e96bf22df1
Child:
24:f0989eca7469

File content as of revision 23:eb5a5da6e83f:


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