Skip to main content
2 of 2
edited tags
Kromster
  • 10.7k
  • 4
  • 54
  • 67

Should I store game settings in my game data class?

I'm working on a small-ish 2d fixed shoot 'em up for iPhone.

I have a master Game object that stores lives, score, current level, etc...

The game will have some other persistent attributes like Music and Sound mute state, difficulty level (easy, medium, hard).

Should I put those attributes in the Game class or should they be on their own?

What's the rule of thumb to decide how to partition attributes among classes?

willc2
  • 247
  • 1
  • 8