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 6130737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:53:36+00:00 2026-05-23T16:53:36+00:00

I am creating a calculator for some cards game. In that game, I am

  • 0

I am creating a calculator for some cards game. In that game, I am creating a Singleton class to manager the game. It holds the scores, keeps track of where the game is etc…

Now after the app launches, I will ask the user to enter 4 players’ names. After that, 4 player objects are instantiated according to their names. I already have an object called “Player”, so 4 players will get instantiated with their name, and a score of 0 to start with.

Now I need to store those players in my singleton class. Therefore, I created 4 Player properties in the class. However my question is, under the init method in the Singleton class, in:

if ((self = [super init])) {
    // set properties here
}

Where // set properties here is, what do I write? Do I have to do anything with the Players properties over there?

Thank you,

  • 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-23T16:53:36+00:00Added an answer on May 23, 2026 at 4:53 pm

    No, you aren’t required to do anything with them, although I would probably set them to nil.

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

Sidebar

Related Questions

Creating liquid layouts is an immense pain. Now, I totally understand that tables should
i have a program that takes some time creating pdf files i would like
Using javascript, I'm creating some html content--some nested divs that are styled via a
I'm creating a HQL query that uses eager fetching for some collections and properties.
I'm creating one UIViewController that operates a calculator interface, while another UIViewController deals with
Creating a calculator-like dialog, I noticed that quickly clicking on a button in IE
I am creating a calculator application for all types of mathematical algorithms. However, I
I am creating a graphing calculator in Java as a project for my programming
I am creating a poker system and I am currently streamlining my hand calculator.
Creating a class at runtime is done as follows: klass = Class.new superclass, &block

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.