American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Android Game Dev – Gamas

May 14 @ 6:00 pm - 7:00 pm

Today We Did
  1. We went over how to set each of the box with X and O image when user click.
  2. We prevent the box to be overridden when it is already occupied.
Homework
  1. add codes so when you click the reset button, it will do the following
    1. clear the box from either X or O image.
      1. box.setImageResource(0);
    2. set null to box.setTag(null).
    3. set the activePlayer back to player1
    4. set the status bar back to player1’s turn.
  2. Hint:
    1. 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()

Details

Date:
May 14
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights