ELEC2645 (2018/19) / Mbed 2 deprecated el17ebs

Dependencies:   mbed FATFileSystem

Committer:
ellisbhastroud
Date:
Wed Apr 17 10:35:52 2019 +0000
Revision:
6:747335f697d6
Parent:
5:0b31909caf7f
Child:
7:5a19dd9fe8a4
Wont Compile - Finding Error

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ellisbhastroud 5:0b31909caf7f 1 #include "GolfEngine.h"
ellisbhastroud 5:0b31909caf7f 2
ellisbhastroud 5:0b31909caf7f 3 void GolfEngine::init()
ellisbhastroud 5:0b31909caf7f 4 {
ellisbhastroud 6:747335f697d6 5
ellisbhastroud 5:0b31909caf7f 6 }
ellisbhastroud 5:0b31909caf7f 7
ellisbhastroud 5:0b31909caf7f 8 void GolfEngine::drawGame(N5110 &lcd)
ellisbhastroud 5:0b31909caf7f 9 {
ellisbhastroud 5:0b31909caf7f 10 _ball.drawBall(lcd);
ellisbhastroud 5:0b31909caf7f 11 _ball.printShotCount(lcd);
ellisbhastroud 5:0b31909caf7f 12 drawCourseWalls(lcd);
ellisbhastroud 5:0b31909caf7f 13 }
ellisbhastroud 5:0b31909caf7f 14
ellisbhastroud 5:0b31909caf7f 15 void GolfEngine::update_ball(Gamepad &pad, int frame_rate)
ellisbhastroud 5:0b31909caf7f 16 {
ellisbhastroud 5:0b31909caf7f 17
ellisbhastroud 5:0b31909caf7f 18 _ball.shoot_ball(pad);
ellisbhastroud 5:0b31909caf7f 19 _ball.check_wall_bounce();
ellisbhastroud 5:0b31909caf7f 20 _ball.move_ball(frame_rate);
ellisbhastroud 5:0b31909caf7f 21 _ball.check_wall_bounce();
ellisbhastroud 5:0b31909caf7f 22 }
ellisbhastroud 5:0b31909caf7f 23
ellisbhastroud 5:0b31909caf7f 24 void GolfEngine::drawCourseWalls(N5110 &lcd)
ellisbhastroud 5:0b31909caf7f 25 {
ellisbhastroud 5:0b31909caf7f 26 for(int i = 0; i > 5; i++) {
ellisbhastroud 5:0b31909caf7f 27 lcd.drawLine(_level_1[i].start.x,_level_1[i].start.y,_level_1[i].end.x,_level_1[i].end.y,1); //draws line for each wall in course
ellisbhastroud 5:0b31909caf7f 28 }
ellisbhastroud 5:0b31909caf7f 29 }
ellisbhastroud 5:0b31909caf7f 30