test 1 doc

Dependencies:   mbed Gamepad2

Revision:
5:928c2eee4109
Parent:
4:cf5088ace087
Child:
6:00d20886e4f8
--- a/Engine/Engine.cpp	Mon May 18 18:46:13 2020 +0000
+++ b/Engine/Engine.cpp	Fri May 22 01:26:24 2020 +0000
@@ -14,36 +14,38 @@
     //init coord
     _px = WIDTH / 2;
     _py = HEIGHT / 2;
-
+    _plat.init();
     //init call
     _p.init(_px, _py);
 }
 
+//reads direction and magnitude from the JOYSTICK to control the player
 void Engine::read_input(Gamepad &pad)
 {
     _d = pad.get_direction();
     _mag = pad.get_mag();
 }
 
+
+//draw both player and map 
 void Engine::draw(N5110 &lcd)
 {
     // player
     _p.draw(lcd);
+    _plat.draw(lcd);   
 
 }
 
+//provide the player file with necessary Joystick values
 void Engine::update(Gamepad &pad)
 {
 
     _p.update(_d,_mag);
-    //wallCollide(pad);
     //enemmyCollide(pad);
 }
 
+
 /*
-void Engine::wallCollision(Gamepad &pad)
-{
-}
 
 void PongEngine::check_paddle_collisions(Gamepad &pad)
 {