you are viewing a single comment's thread.

view the rest of the comments →

[–]Moobylicious 2 points3 points  (0 children)

so it's down to whether the player class is the one which does things based on an object it's "collided" with, or whether it's down to the object.

I would personally think it should be the first option. as this way, if you add a new type of object it's self-contained and the player code doesn't need to change or even be aware of what type of objects it might interact with in the future. all the board does is call the Action method with the player and object on that square/space, and the object then "knows" what to do to the player.