Hey guys, I'm new to both iPhone programming and programming in general and have a question. I'm making a tile-based game, and I'm not sure if I'm going about it the right way. Please note at the moment I am just putting the game in the initial ViewController for ease, I will worry about menus etc later.
I have the following classes:
Game
Side
Character
I create a Game instance, which creates two Side instances, which each create 3 Character instances.
Now the way I'm doing this is the ViewController viewDidLoad method, passing down the self parameter as I create the classes so that when I eventually get down to the character setup I can call a method in ViewController to place the characters on the tiles. Is this correct? Or should I have my classes set as global variables so that I don't have to do this?
I have the following classes:
Game
Side
Character
I create a Game instance, which creates two Side instances, which each create 3 Character instances.
Now the way I'm doing this is the ViewController viewDidLoad method, passing down the self parameter as I create the classes so that when I eventually get down to the character setup I can call a method in ViewController to place the characters on the tiles. Is this correct? Or should I have my classes set as global variables so that I don't have to do this?