fun_game.aia (13.6 KB)
Probably each of your if statements is cancelling out the previous if statement all the way to the end.
Review your logic.
Your combination detection logic should be ignoring the third out of three matches, not insisting it match a specific number.
What you coded:
How those extra comparisons would be removed:
But we're not out of the woods yet.
I just noticed you are comparing the wrong things, constants against lists of possibilities, without regards for what was actually chosen and displayed!
Even worse, you rubber stamped that mistake 30 times!
This would be patched by introducing three new global variables, and dumbly going through the code and replacing the global variable references.
Here is what we are up to, if you want to impress upon your teacher how you did not read the chapters on procedures, lists, and tables.
fun_game (1).aia (11.4 KB)
Are you ready to continue your slog through the Swamps of Dumbth?
See Chapter 21
http://www.appinventor.org/book2
You can simplify your code by coding these procedures and lookup tables:
- Majority(3 values), returns the value that appeared twice or more, else blank if all different
- Score(majority), returns how many points (+/-) to add to your score based on the majority symbol you give it.
That would collapse your blocks by 90%.