Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6071495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:03:13+00:00 2026-05-23T10:03:13+00:00

Problem I am creating a score calculator for a certain cards game. It gets

  • 0

Problem

I am creating a score calculator for a certain cards game. It gets quite complicated in terms of navigation and view controllers.

Basically, what I need is a way to track the current score, 4 players’ objects instantiated upon startup and a way to track the progress of the game (the game has 4 sort of “levels” or “cycles”).

Possible Solutions

So what I am thinking of doing is to create a Singleton class for the score manager. I also created a Player object which I will probably instantiate in the AppDelegate class and keep it passing them in an array upon new VC loads.

Continue Last Game

I would like the app to store the last game if the app has been terminated, and an option to resume it upon startup. I will have to keep track of: players’ names, each player’s score, as well as a detailed score sheet for each round played.

My Questions

  • Is my solution to create 4 players’ objects in the AppDelegate and pass them along VC’s upon each VC push a good solution? If not, how do games usually implement a Player object? I’ve created games in the past using C++ and Java but there were all too simple and the “game manager” was only one class, so I never had to deal with passing the Players objects around before. Furthermore, if a player hits “Back” and the navigation controller pops an item off its stack, will the player object still be instantiated in the previous VC? If not, will I also have to pass it when the “back” button is hit?

  • I will probably have the score management also track the progress of the game, or where the game is at using a Singleton class. Is that a good design decision?

  • To store the names, scores and the whole score sheet, is it advisable to just use NSUserDefault or would it be better to use a plist, especially since I need to track the score sheet?

Any implementation advice is highly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:03:14+00:00Added an answer on May 23, 2026 at 10:03 am

    Good question. I like your idea of implementing the game. The only concept I won’t suggest you to implement is to create the players in your AppDelegate. There is no harm in doing so, but it is also not a good practice to alter your AppDelegate. Instead what you may do is create a separate class, say Player.h and Player.m (Player.mm in case you are using Box2d). Do the stuff you wish to do and call the class variables and functions in your scene.
    Secondly, the idea of using PList over NSUserDefault will be more efficient when you wish to store large amount of data and vice verse, if you want to store small data. This is a good discussion which might help you for the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem with creating a navigation controller after on the other
Problem Statement: I'm creating a template for multi tiered complicated calculations in MS Excel
) I'm in a process of creating a memory game. My problem is that
I have this alogirthm problem, in terms of creating mysql tables, let me explain
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I've been having a problem creating a checklist in the style of the TouchCells
Having a bit of a problem creating an instance of an object. Bear in
I have problem with creating a simple MySQL trigger in C#. I'm using StringBuilder
I'm troubleshooting a problem with creating Vista shortcuts. I want to make sure that
I am facing a problem while creating a static cursor in DB2. This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.