Learn Courses My Dashboard

Offline game with multiple players

I want to make a card game with multiple players but you can play it on 1 phone. So you can only play it offline, you need to add names on your phone. After your turn, pass the phone to the next person. Does anyone know how to do this? Or does anyone know where this is explained? On a youtube video, or a course etc. Unfortunately I can’t find it…

You already have the tools necessary after following the war card game and some of iOS foundations!

You can use an Alert with a text box to enter the players names, save those to Core Data or UserDefaults.

You can keep track of who’s turn it is in a variable, or in UserDefaults (if you need to pause the game).

What part specifically are you struggling with, in setting this up?

@mikaelacaron Thanks for your detailed answer! I’m struggling with the part that i need to turn to another player and that the cards that the players have be saved. So that when it’s the players he see his own cards. Do you know any videos that explain what you said?