Notice the different numbers for green colors used when you set the text color versus when you test the text color.
You made several mistakes in this app:
- You did not set aside constant global variables RED, YELLOW, GREEN with your color choices, to be referenced in both the assignments and the tests
- You used a rubber stamp instead of parametrized procedures, proliferating your mistakes all over your app instead of concentrating them in a single procedure.
- You did not use a table of Labels to help loop through your labels by index
- You used Label2 and Label3 instead of appropriately named LblMoveNumber and LblRemainingMoves, abusing the time of people who would have otherwise had more time to examine your code more closely
See this sample app for how to do this type of game without a rubber stamp:
