AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

games/Game.cpp

Committer:
sillevl
Date:
2015-05-23
Revision:
16:e8e96bf22df1
Parent:
14:e0bfee0a5e66
Child:
23:eb5a5da6e83f

File content as of revision 16:e8e96bf22df1:

#include "Game.h"

Game::Game(Board* board){
    this->board = board;
    lcd = board->lcd;
    leds = board->leds;
    key = board->key;
    button = board->button;
    keyboard = board->keyboard;
    buzzer = board->buzzer;
    
    //keyboard->attach(this,&Game::keyEvent);
    //keyboard->start();
    leds->off(Leds::ALL);
}

Board* Game::getBoard(){
    return board;
}

void Game::init(){
    board->lcd->cls();
    board->lcd->printf("Starting game");
    board->lcd->locate(1,0);
    board->lcd->printf("DummyGame");
    wait(3);
}

void Game::end(){
    board->lcd->cls();
    board->lcd->printf("Ending game");
    board->lcd->locate(1,0);
    board->lcd->printf("DummyGame");
    wait(5);
}