Ahmed Hedait / Mbed 2 deprecated el16ah

Dependencies:   mbed

MazeEngine/MazeEngine.cpp

Committer:
ahmedhedait
Date:
2018-05-08
Revision:
20:041affa5e242
Parent:
19:c6ebd1394bda
Child:
21:bcc84d5cb068

File content as of revision 20:041affa5e242:

#include "MazeEngine.h"
// nothing doing in the constructor and destructor
MazeEngine::MazeEngine()
{

}

MazeEngine::~MazeEngine()
{

}

void MazeEngine::init()
{
    _ball.init();
}

void MazeEngine::read_input(Gamepad &pad)
{
    _dir = pad.get_direction();
}

void MazeEngine::update(Gamepad &pad)
{
    _ball.update(_dir);
}

void MazeEngine::draw(N5110 &lcd)
{
    // draw the elements in the LCD buffer
    // maze
    _maze.draw(lcd);

    // ball
    _ball.draw(lcd);
}