Search code examples
classumldiagrams

class diagram Question(UML)


ok so I want to make a game but am having some difficulty in getting the class diagram sorted.

this would be for the Use case of : user Equips weapon. (user can select unlocked weapons only,) what would the class diagram of this look like with 2 weapons for instance ? thanks in advance


Solution

  • Here is an example UML diagram modeling the relationships you describe in your question. Note that this diagram assumes that the player always has at least one weapon unlocked and that the player always has one and only one selected weapon.

    alt text