![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Game codes for Pokemon Academy Yiu Fai Kwok - 201198802 I have read the University Regulations on Plagiarism and state that the work covered by this declaration is my own and does not contain any unacknowledged work from other sources.
Dependencies: mbed FXOS8700CQ mbed-rtos
Diff: main.cpp
- Revision:
- 21:704d938acf5d
- Parent:
- 15:a65444eb1194
- Child:
- 22:f8f36e88b2ca
diff -r 50ad2dad310d -r 704d938acf5d main.cpp --- a/main.cpp Mon Apr 22 10:32:40 2019 +0000 +++ b/main.cpp Sun Apr 28 18:04:23 2019 +0000 @@ -224,7 +224,7 @@ else{term_three();} game_2.init(game_2_speed, game_2_cha, game_2_r); int j = 0; - while(j < 10){ + while(j < 6){ game_2.read_input(device); game_2.update(pad, lcd, game_2_cha); game_2.render(lcd, game_2_cha); @@ -232,7 +232,7 @@ j = game_2.get_count(); } i = i++; - if(game_2.get_count() == 10) { + if(game_2.get_count() == 6) { win(); music.win(pad); wait(0.5); @@ -387,9 +387,10 @@ { lcd.init(); pad.init(); + device.init(); // change set contrast in range 0.0 to 1.0 // 0.4 appears to be a good starting point - lcd.setContrast(0.5); + lcd.setContrast(0.4); } // simple splash screen displayed on start-up @@ -568,7 +569,7 @@ game_1_speed = 9; game_1_cha = 1; game_1_r = 5; - game_2_speed = 5; + game_2_speed = 1; game_2_cha = 1; game_2_r = 6; } @@ -621,7 +622,7 @@ game_1_speed = 12; game_1_cha = 2; game_1_r = 3; - game_2_speed = 6; + game_2_speed = 2; game_2_cha = 2; game_2_r = 5; } @@ -674,7 +675,7 @@ game_1_speed = 14; game_1_cha = 3; game_1_r = 2; - game_2_speed = 7; + game_2_speed = 3; game_2_cha = 3; game_2_r = 3; }