Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Blocks/Blocks.cpp
- Revision:
- 42:973bb6036f81
- Parent:
- 41:4edac50f010d
- Child:
- 43:233f93860d08
--- a/Blocks/Blocks.cpp	Tue Apr 23 12:25:49 2019 +0000
+++ b/Blocks/Blocks.cpp	Tue Apr 23 15:22:09 2019 +0000
@@ -297,8 +297,6 @@
         k = 0;
     }
      if(k == 0){
-        send = 0;  //this is for the game to decide wether to remember the number on the block for the current itteration.
-                   //we dont need to remember if it has already gone past the screen.
         _bx = 0;
         _by = -11;
         k = k+1;
@@ -409,12 +407,12 @@
 }
 
 
-void Blocks::update(int blocknum, int srn, int send) //send sends the block number only when the y position satisfies a particular requirement
+void Blocks::update(int blocknum, int srn, int send_block_number) //send sends the block number only when the y position satisfies a particular requirement
 {                                                    //and srn gives the srn of the block, snake is colliding with.
     _bx += velocity.x;
     _by += velocity.y;
         
-    if(send) {caseselect[srn] = blocknum;}
+    if(send_block_number) {caseselect[srn] = blocknum;}
 }