Homework Solution: A MUD, or Multi-User Dungeon/Dimension/Domain, is a multi-player text environment in which the player types commands a…

    A MUD, or Multi-User Dungeon/Dimension/Domain, is a multi-player text environment in which the player types commands and the MUD responds with text. A MUD consists of players, rooms, items, and MOBs (MOBile non-player characters). Players within the MUD can move about from room to room, collect items that affect them or allow them to do things. MOBs can also move from room to room and players can interact with them. Rooms in a MUD are thought of as locations rather than indoor areas. For example a “room” could be a clearing in the woods with paths leading to the north and west. Rooms have exits that connect them to other rooms, descriptions, and contents that include items, players and MOBs. Design the classes for a MUD. You need to produce both a written description of your design as well as UML diagrams. As you proceed, consider that you want your design to give you flexibility to perform modifications as you refine and modify your project later on during the semester. For example, if you are handling input and output in many different locations this will complicate, or even prohibit, changes to handle the I/O within a GUI later on. You will also want to think about how inheritance can help you in your design. Requirements: 1. Players must have a name and must be in a location. They are able to carry items with them as they travel. They are able to move between rooms through the use of commands. 2. Rooms have a description and a list of possible exits as well as a list of contents (items, MOBs, and players). 3. Items may be located in a room or carried by a player. 4. MOBs are able to move between rooms independently from the actions of players. 5. The commands issued by players include the set of movement commands (north, south, east, west, up, down, etc.) as well as commands to “get” and “drop” items. Finally, the command “exit” will terminate play in the game. Additional commands may be added at your discretion.

    Expert Answer

     
    The UML diagram for the MUD is as follows:

    A MUD, or Multi-User Dungeon/Dimension/Domain, is a multi-player quotation environment in which the enacter types charges and the MUD responds with quotation. A MUD consists of enacters, opportunitys, items, and MOBs (MOBile non-player characters). Enacters among the MUD can propose environing from opportunity to opportunity, assemble items that seek them or afford them to do things. MOBs can too propose from opportunity to opportunity and enacters can interact with them. Opportunitys in a MUD are deliberation of as dregss rather than indoor areas. Coercion illustration a “room” could be a defecation in the woods with paths indispenscogent to the north and west. Opportunitys enjoy exits that with them to other opportunitys, designates, and discontinuance that apprehend items, enacters and MOBs.

    Artifice the classes coercion a MUD. You deficiency to consequence twain a written designate of your artifice as courteous-mannered-mannered-mannered as UML diagrams. As you income, weigh that you nonproduction your artifice to bestow you flexibility to achieve modifications as you levigate and modify your scheme after on during the semester. Coercion illustration, if you are handling input and output in numerous contrariant dregss this obtain complicate, or smooth coercionbid, changes to treat the I/O among a GUI after on. You obtain too nonproduction to ponder environing how bequest can acceleration you in your artifice.

    Requirements:

    1. Enacters must enjoy a designate and must be in a dregs. They are cogent to convey items with them as they journey. They are cogent to propose betwixt opportunitys through the verification of charges.

    2. Opportunitys enjoy a designate and a register of feasible exits as courteous-mannered-mannered-mannered as a register of discontinuance (items, MOBs, and enacters).

    3. Items may be located in a opportunity or carried by a enacter.

    4. MOBs are cogent to propose betwixt opportunitys inconsequently from the actions of enacters.

    5. The charges issued by enacters apprehend the fixed of proposement charges (north, south, east, west, up, down, expectation.) as courteous-mannered-mannered-mannered as charges to “get” and “drop” items. Finally, the charge “exit” obtain end enact in the play. Additional charges may be borrowed at your deliberation.

    Expert Rejoinder

     

    The UML diagram coercion the MUD is as follows: