« All Events
1 PM – Android Game Dev – Gamas
March 25, 2023 @ 1:00 pm - 2:00 pm
Homework
- Continue on Tic Tac Toe game.
- In the activity_main.xml, change the color of the “Start Game” button from purple to blue, similar to activity_game.xml.
- Inside GameActivity.java use for loop to add action listener to 1st row.
- After this, also use for loop to add action listener to 2nd and 3rd rows.
- If you do it properly, all boxes, when you clicked, will spit out “box clicked” message in the “Run” tab.
- The hint, you have to change the “boxId” every time you loop. Utilize the “i” in the for loop.