« All Events
1 PM – Python Game Dev – Gamas
April 15, 2023 @ 1:00 pm - 2:00 pm
Today We Did
- We continued with Tic Tac Toe android game.
- We learned how to use SharedPreference to pass information from one page to another page inside the app.
- We displayed the first player’s name into Game Activity statusBarLabel ui component.
Homework
- set “player1Score” label with first player’s name, the one that user enters in the landing page.
- set “player2Score” label with second player’s name, the one that user enters in the landing page.
- after every click on the board, change the statusBarLabel to show whose turn is it? If player 1 is “Gamas” and player 2 is “John”, then the statusBarLabel need to show “Gamas’ Turn” when the game starts. After Gamas click on the board, the statusBarLabel need to show “John’s turn” etc. You need to do this inside GameActivity.onClick(View view) method.