If i have a textgame that has a world object that has objects of type room which has objects of items and enemies and then a gamehelper object that has user objects for the actual player. (this game doesn't have wandering enemies since that would complicate my question to much for me :-))
How should I go about either killing an enemy or picking up an object? Or should I think some other way when structuring up my classes completely? I got the suggestion that I would need a manager that controls the world and mediates between users and objects but I can't figure out how that would look/work.
I would also implement interfaces of killable and pickable to separate objects from eachothers when necessary if thats of any relevance... And oh im learning Java so any example code that might be useful to understand could be written in that.
Ie:
World
|
____Rooms____ (could be like a 4x4 array or something with X and Y cords)
| |
Objects Enemies (Either killable / pickupable)
Game
|
User (can walk around in rooms, kill monsters and take treasure)