Mortal Kombat Game ELEC2645

Dependencies:   mbed N5110 ShiftReg Joystick

Revision:
7:737fb0c3dbef
Parent:
6:a1a7dc264fed
Child:
9:8c840b08a633
--- a/main.cpp	Wed Apr 21 22:56:55 2021 +0000
+++ b/main.cpp	Thu Apr 22 01:24:12 2021 +0000
@@ -12,7 +12,7 @@
 GameEngine game;
 Fighter fighter;
 Menu menu;
-// Enemy enemy;
+Enemy enemy;
 DigitalIn buttonA(p29);
 DigitalIn buttonB(p28);
 DigitalIn buttonC(p27);
@@ -37,8 +37,7 @@
         lcd.clear();
         draw_background();
         // fighter.draw(lcd, buttonA, buttonB, buttonC, buttonD, joy_v, joy_h);
-        // initialize game
-        game.init(lcd, buttonA, buttonB, buttonC, buttonD, joy_v, joy_h);
+        game.start(lcd, buttonA, buttonB, buttonC, buttonD, joy_v, joy_h);
         
     }
 }
@@ -46,10 +45,7 @@
 void init() { // initialize all devices
     lcd.init();
     lcd.setContrast(0.5);
-    //fighter.set_x(33);  // setting initial position of fighter
-    //fighter.set_y(GROUND);  // placing fighter on ground
-    // enemy.set_x(40);  // setting initial position of enemy
-    // enemy.set_y(GROUND);  // placing enemy on ground
+    game.init();
 }
 
 void menu_screen() {