A fun game to test your color perception abilities.
Contributed as part of the Flutter Create 5K challenge by Yukkei Choi.
Tap the unique color block as fast as possible.
- Each round when user taps the unique color block, score will be increased by one.
- Timer: 30 seconds countdown.
- Color difference will be stepwise reduced when user reached a higher score.
- If it is difficult to distinguish the unique color block, user can "SHAKE" the device to shift to another theme color, while the position of the unique color block still keep the same.
- Provide a restart button at the end, user can infinitely play again without relaunching the app.
- After each replay, game board's theme color will be different from the previous play.
- Give user a grade based on the final score:
| score range | grade |
|---|---|
| 0 - 9 | Fail |
| 10 - 19 | D |
| 20 - 29 | C |
| 30 - 34 | B |
| 35 - 39 | B+ |
| 40 - 44 | A |
| 45 or above | A+ |
- I created all graphics used on the app by using Photoshop.
- Flutter is great and now I'm able to demonstrate my artwork on the app into practice.
- Use stateful widget to run the timer countdown animation.
- Since only 5kb is allowed, the grade is calculated by using math, instead of writing if-else statement.
- Use redux to store the game states:
| state | description | data type |
|---|---|---|
| score | Store the player score | int |
| board | Locate the position of unique color block | [[int],[int],...] |
| count | Count the no. of replay, for switching the theme color | int |
| page | Current page / game status | int |
| page | description |
|---|---|
| -1 | First launch the app, show the welcome screen with instruction |
| 0 | Game in progress |
| 1 | Game end, show result |
Limited to portrait view.