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.
Dependencies: mbed
Diff: Cricket/Cricket.cpp
- Revision:
- 32:1bc731f03a30
- Parent:
- 31:eefa1d23a843
- Child:
- 34:d9099874bbc3
--- a/Cricket/Cricket.cpp Wed May 08 12:13:28 2019 +0000 +++ b/Cricket/Cricket.cpp Wed May 08 13:15:45 2019 +0000 @@ -311,6 +311,7 @@ d = 1+ rand() % 6; pos=rand()%2; for (int j=0;j<10;j++){ + //checks if the number generated has already been used to set a fielder if (fieldNumbers[j]==d){ continueCount=1; } @@ -319,6 +320,7 @@ continueCount=0; continue; } + //sets fielders based on random number generated if (d==1){ //NW if (pos==1){ field[i].dir=NW;