代写FIT9131、Java程序设计代做
FIT9131 Assignment B: Fellowship of Code: a Java Adventure in Middle Earth

Introduction

In preparing your program, please note the following:

You must use the workspace environment in the Ed platform to code all parts of your program. You must not copy and paste large sections of code from somewhere else.

You must acknowledge all code in your assignment that you have taken from other sources.

The Java source code for this assignment must be implemented according to the FIT9131 Java Coding Standards.

Only a text interface is to be used for this program. More marks will be gained for a program that is easy to follow with clear navigation information and error messages.

In this assessment, you must not use generative artificial intelligence (AI) to generate any materials or content in relation to the assessment task.

Any points needing clarification may be discussed with your tutor in your applied learning class. You should not make any assumptions about the program without consulting your tutor.

Completion of this assignment contributes towards the following FIT9131 learning outcomes:

Design and construct Java programs according to standard object-oriented principles

Apply and demonstrate debugging processes to Java applications

Develop strategies for efficient and effective program testing

Document code according to specific programming standards

Identify and apply the "object-oriented" concepts of encapsulation, abstraction and polymorphism

Explain and apply software engineering principles of maintainability, readability and modularisation

Specification
For this assignment you will write a program to play a game Fellowship of Code: a Java Adventure in Middle Earth. This section specifies the required functionality of the program.

Special Note: Before your Applied class in Week 11 there will be a small enhancement to the specification, so good design for your program will be important to allow easy modification to incorporate this change.

Background
Fellowship of Code is a game where a group of adventurers go on a quest through a labyrinth in Middle Earth to deliver a secret code stored on a floppy disk to a Java wizard on Mount Api. During the quest the group must protect the secret code from being stolen by any evil creatures they encounter. The group of adventurers are known as the Fellowship. The Fellowship is led by a hobbit and other members of the group are elves and dwarves. The evil creatures that try to steal the code are orcs, trolls, and goblins.

The aim of the quest is for the Fellowship to travel through a labyrinth and safely deliver the code. The labyrinth consists of a series of connected caves, with each one having at least one entry into another cave. At least one of the caves will have an exit to Mount Api. The Fellowship must decide which option to take as they navigate through the labyrinth. When entering a cave the Fellowship may encounter an orc, a troll or a goblin. As a consequence, they may suffer damage, and may have the code stolen from them. If the code is stolen then the Fellowship may try to steal it back if they encounter the same creature again. If any creature suffers too much damage, then they die and no longer participate in the game. The game ends successfully when at least one of the Fellowship reaches Mount Api with the secret code to deliver to the Java wizard.

Note that some of the characters and places in this assignment are taken from the "The Lord of the Rings" novels by J.R.R. Tolkien.

This section specifies the required functionality of the program. Only a text interface is required for this program; however, more marks will be gained for a simulation that is easy to follow with clear information/error messages to the user.

Fellowship of code
The Fellowship of Code game is controlled by a player. The player chooses the members of the Fellowship, chooses which members of the Fellowship will fight and makes the navigation decisions. The evil creatures appear randomly in each cave and the player must decide how to deal with them. The structure of the labyrinth is pre-determined and is read in from a file.

Program start up

The program begins by displaying a welcome message and brief instructions for the game.

The player is prompted for the type of creatures they would like to have as members of the Fellowship. They can choose up to 4 members. The leader will be a hobbit and the remainder must be elves or dwarves, in any combination. Each creature starts with no damage points and the following power ratings, which is used to determine their chances of winning a fight:

hobbit: power = 3 points

elf: power = 5 points

dwarf: power = 7 points

In addition, the hobbit and each elf will have a special weapon, which can be used once and will always win a fight. Dwarves have greater power but no special weapon.

The labyrinth structure is read in from a file labyrinth.txt. The file consists of a number of lines, with each line containing the details of one cave. Each line has five comma separated integers: cave identity, north cave identity, east cave identity, south cave identity, west cave identity. A zero value for a north, east, south, west cave identity means that the entry to the cave is blocked or there is no cave in that direction. A value of 100 is the identity of Mount Api.

A collection of caves is created from the details read from the file. Each cave will have the following details.

cave identity: an integer

north: identity of the northern cave or Mount Api, or 0 if the entry is blocked.

east: identity of the eastern cave or Mount Api, or 0 if the entry is blocked.

south: identity of the southern cave or Mount Api, or 0 if the entry is blocked.

west: identity of the western cave or or Mount Api, or 0 if the entry is blocked.

Living in the caves are orcs, trolls, and goblins. These are aggressive creatures that will fight to steal the code. These creatures start with no damage points and the following power ratings:

orc: power = 5

troll: power = 9

goblin: power = 3

Note that these creatures do not have any special weapons.

The game begins with the Fellowship entering the first cave with the secret code. The Fellowship navigates from cave to cave through the labyrinth until they reach Mount Api or die along the way.

Specific actions in a cave

When the Fellowship enters a cave the following may occur:

1. There is a 75% chance of an orc, troll, or goblin being present in the cave. No more than one creature will be in the cave. Each creature has the same probability of appearing. The creature remains in the cave for the duration of the game.

2. If there is no orc, troll, or goblin in the cave then:

the Fellowship members have a chance to recover and each member loses a damage point. Note that the damage points can't be negative.

the Fellowship chooses the next cave to enter or takes the exit to Mount Api, if available.

3. If there is an orc, troll, or goblin in the cave then this aggressive creature will fight to steal the code. The player decides which member of the Fellowship will fight the creature. Possible outcomes of the fight depend on the difference in power rating. If a creature has a power rating of:

4 or more points greater than their opponent, they have a 90% chance of winning.

3 or more points greater than their opponent, they have a 80% chance of winning.

2 or more points greater than their opponent, they have a 70% chance of winning.

1 or more points greater than their opponent, they have a 60% chance of winning.

equal to their opponent then each has a 50% chance of winning.

4. A creature can use their special weapon once in the game. The special weapon will kill the opponent.

5. As a result of a fight:

The winner steals the secret code.

The damage points of the winner is increased by 1 point.

The damage points of the loser is increased by 4 points.

The creature will die if a special weapon has been used against them.

6. A creature can use their special weapon once in the game. The special weapon will kill the opponent and there will be no damage to the creature that used the weapon.

7. If a creature has 10 or more damage points then they unfortunately die and are no longer in the game.

8. If the last member of the Fellowship dies then the game ends.

9. If the orc, troll, and goblin are all killed then the Fellowship can navigate the labyrinth safely until they reach Mount Api.

10. After a fight the player chooses the next cave for the Fellowship to enter.

If there is only one cave option then the Fellowship must enter this cave.

If there is an exit to Mount Api then the Fellowship may take this exit to deliver the secret code to the Java wizard and the game ends.

If the Fellowship does not have the secret code then they would try to navigate back to the cave to steal back the code from the creature that has the code.

11. After these events and before moving to the next cave, the following information is displayed:

a list of caves the Fellowship has visited showing whether there is a creature in the cave

an indication of which creature holds the code

the damage points for each creature

the identity of the cave that the Fellowship will enter

Specific actions at the end of the game

At the end of the game a summary is displayed.

The outcome of the quest, whether it was successful or not and the creature that delivered the code

The number of caves visited by the Fellowship

The number of times the secret code changed hands

A list of the creatures that died.

The Fellowship fight success rate given as:
number of fights won by the Fellowship * 100 / total fights

A summary is written to the file fellowship.txt.

热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图