« All Events
6 PM – Android Game Dev – Gamas
May 14 @ 6:00 pm - 7:00 pm
Today We Did
- We went over how to set each of the box with X and O image when user click.
- We prevent the box to be overridden when it is already occupied.
Homework
- add codes so when you click the reset button, it will do the following
- clear the box from either X or O image.
- set null to box.setTag(null).
- set the activePlayer back to player1
- set the status bar back to player1’s turn.
- Hint:
- inside the new method that you are going to create. You need to do the 2 nested for loops to go through each of the box and add codes appropriately. This is very similar with the 2 for loops you already did inside
addClickListenerToAllBoxes()