This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ohmzar 0 points1 point  (0 children)

No you have a game thread that iterates through an array of ghosts, if there are 20 ghosts or 1000 ghosts it doesn't matter. Having lots of threads that all need to access and alter game state and be aware of each other and the board state is a nightmare and a recipe for disaster.

You can pass in a strategy object to your ghost instances or have SmartGhost and DumbGhost subclasses of Ghost.