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.
Revision 24:2b14f846cf28, committed 2013-08-28
- Comitter:
- vsluiter
- Date:
- Wed Aug 28 07:26:37 2013 +0000
- Parent:
- 23:861ceaca2518
- Child:
- 25:3144a392690b
- Commit message:
- Changed scoring color, yellow for draw
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Aug 27 21:22:14 2013 +0000
+++ b/main.cpp Wed Aug 28 07:26:37 2013 +0000
@@ -254,17 +254,18 @@
templeft = left>scorecounter?scorecounter:left;
tempright = right>scorecounter?scorecounter:right;
//pc.printf("scorecounter: %d, maxscore: %d\n\r",scorecounter, maxscore);
- if(scorecounter == maxscore)
+ /*Change color on last score update: green is winning, red is losing, yellow is draw*/
+ if(scorecounter == maxscore)
{
- if(left > right)
+ leftled.green = leftled.red = leftled.blue = rightled.green = rightled.red = rightled.blue = 0;
+ if(left >= right)
{
- leftled.green = leftled.red = leftled.blue = rightled.green = rightled.red = rightled.blue = 0;
+
leftled.green = 255;
rightled.red = 255;
}
- if(right > left)
+ if(right >= left)
{
- leftled.green = leftled.red = leftled.blue = rightled.green = rightled.red = rightled.blue = 0;
leftled.red = 255;
rightled.green = 255;