« All Events
1 PM – Android Game Dev – Gamas
May 13, 2023 @ 1:00 pm - 2:00 pm
Homework
- When user click “RESET GAME” button, set statusBarLabel to “<player 1 name> turn”.
- When we already have a winner, prevent user to click further.
- Create two more variables in Constants.java:
- GAME_IN_SESSION = 1
- GAME_WIN = 2
- GAME_TIE = 3
- Inside GameActivity.java, you need to add one more attribute:
- private int gameMode = GAME_IN_SESSION
- When someone win set gameMode = GAME_WIN
- Add code in onClick(View) if gameMode == GAME_WIN, prevent changing the player’s icon.