AirsoftTimer software based on mbed
Dependencies: mbed TextLCD keypad
Objective.cpp
00001 00002 #include "Objective.h" 00003 #include "../games/Game.h" 00004 00005 00006 Objective::Objective(Game* game){ 00007 this->game = game; 00008 Board* board = game->getBoard(); 00009 lcd = board->lcd; 00010 leds = board->leds; 00011 key = board->key; 00012 button = board->button; 00013 keyboard = board->keyboard; 00014 buzzer = board->buzzer; 00015 00016 status = WAITING; 00017 } 00018 00019 Objective::Status Objective::getStatus(){ 00020 return status; 00021 } 00022 00023 void Objective::start(){ 00024 while(status != COMPLETED){ 00025 run(); 00026 leds->on(Leds::LEFT); 00027 } 00028 } 00029 00030 void Objective::complete(){ 00031 status = COMPLETED; 00032 leds->off(Leds::RIGHT); 00033 } 00034
Generated on Tue Jul 12 2022 21:04:09 by 1.7.2