Acorn Runner Acorn Runner: An escape to survive Milestone Deadline: Friday 15th May, 11:59 pm Final Deadline: Friday 29th May, 11:59 pm Weighting: 5% Milestone, 10% Final You are an acorn, heir to the...

Only need the 'Milestone' part done


Acorn Runner Acorn Runner: An escape to survive Milestone Deadline: Friday 15th May, 11:59 pm Final Deadline: Friday 29th May, 11:59 pm Weighting: 5% Milestone, 10% Final You are an acorn, heir to the Honourable Furious Forest Throne. Your beauty shines like no other, reflecting the colourful solar rays into the eyes of all spectators. But instead of your usual coat of beautiful acorn shell, you find yourself covered in ash. Not only that, but you've fallen great depths from the heights of the towering trees of the Honourable Furious Forest that once cared for you. You shed a tear of loss. The horrid memories of the Fire Nation's invasion flash before you as you relive the moments your hometown, the Honourable Furious Forest, was burnt to ashes. Your friends, the koalas and kangaroos, your family, the Honourable Furious Forest members, all burnt to a crisp. Mustering up your motivation for revenge, you, the acorn, heir to the Honourable Furious Forest Throne, stumble forward and find yourself in a maze. You observe walls of fire, helicopter search lights and teleporting pads within. You cry out and slam your little acorn fist on the greyed Honourable Furious Forest floor of dried up leaves. You swear upon your Father's name, Lord Scarlet Oak of the Honourable Furious Forest, that you will conquer this maze and restore the Honourable Furious Forest back to its former glory of rainbow and sunshine. Check the Ed pinned posts for a video demonstrating this assignment in action! af://n3/ This document may receive updates. Please keep an eye on Ed announcements for any amendments. Description In this assignment there will be three parts: A game component. You must be able to play the game yourself. The game will be a 2D maze with the objective of moving from start to end. A solver component. It should play the game as many times as it needs to generate a successful path. More on this in the Solver section of this specification. A report. 3 questions on testing and a short analysis on the solver algorithms involved. Example screenshot with emojis: Legend: ?: The acorn (start)! ?: Ending/Goal cell ➖: Wall cell ?: Water bucket cell ?: Fire cell 1/2: Teleport cell Unfortunately as Ed doesn't support emojis, your game will have to be in ASCII letters as shown in the sample outputs below! Cells af://n17/ af://n55/ Cell character Meaning A Player cell (stands for Acorn) ' ' Air cell (space bar) X Starting cell Y Ending/Goal cell * Wall cells 1, 2, 3, 4, 5, 6, 7, 8, 9 Teleport cells. These numbers will come in pairs. On stepping onto the cell, you enter the cell '1', you teleport to the other '1'. Values greater than 9 will not be given. Note: 0 is not a valid teleport pad! W A water bucket cell. On stepping onto the cell, the player gains a water bucket. F A fire obstacle that you cannot pass unless you have a water bucket. Configuration There will be one txt file which contains an ASCII representation of the maze. The maze may have more than one viable solution. The symbols correspond to the cell characters outlined above. All letters shall be in upper case. Example configuration file: Commands Command Meaning w Move up a Move left s Move down af://n85/ af://n91/ d Move right e Wait a turn q Quit the game If the user enters an invalid move, print Please enter a valid move (w, a, s, d, e, q). . These commands are case-insensitive! See the sample outputs below for usage! Implementation details Your program will be written in Python 3. The only in-built module methods and attributes you are allowed to use are: sys.argv sys.exit() os.system("clear") <--- (more="" on="" this="" later)="" you="" may="" not="" import="" any="" other="" modules.="" to="" help="" you,="" a="" scaffold="" of="" a="" suggested="" implementation="" structure="" is="" provided.="" some="" test="" cases="" require="" certain="" features="" of="" your="" code="" and="" cannot="" be="" modified.="" things="" you="" cannot="" modify="" (these="" are="" tested):="" file="" function/attribute="" why="" it="" must="" not="" be="" modified="" game_parser.py="" parse()="" parse(lines)="" must="" take="" in="" a="" list="" of="" strings="" and="" must="" return="" a="" list="" of="" lists="" of="" cells.="" this="" will="" be="" tested.="" grid.py="" grid_to_string()="" grid_to_string(grid,="" player)="" must="" take="" in="" a="" list="" of="" list="" of="" cells="" and="" a="" player="" and="" must="" return="" a="" single="" string="" representing="" the="" grid="" &="" water="" buckets.="" this="" will="" be="" tested="" cells.py="" display="" the="" display="" attribute="" will="" be="" used="" to="" test="" your="" grid_to_string()="" function.="" player.py="" display="" same="" as="" above.="" player.py="" num_water_buckets="" the="" num_water_buckets="" attribute="" will="" be="" used="" to="" test="" your="" grid_to_string()="" function.="" player.py="" row="" specifies="" their="" row="" in="" the="" grid.="" player.py="" col="" specifies="" their="" col="" in="" the="" grid.="" you="" may="" modify="" any="" other="" files="" to="" your="" liking.="" the="" rest="" of="" the="" scaffold="" is="" to="" help="" you="" with="" some="" basic="" structure!="" you="" may,="" of="" course,="" import="" your="" own="" modules...!="" you="" are="" also="" encouraged="" to="" write="" helper="" functions="" appropriately.="" note:="" no="" file="" other="" than="" run.py="" and="" solver.py="" should="" print="" to="" the="" screen!="" only="" run.py="" should="" print="" to="" the="" screen="" while="" playing="" the="" game.="" this="" is="" good="" programming="" practice,="" so="" get="" used="" to="" it="" early!="" if="" needed,="" you="" may="" use="" it="" sparingly="" to="" debug="" your="" program!="" af://n117/="" game.py="" it="" is="" recommended="" you="" write="" your="" game="" engine="" here.="" by="" writing="" a="" game="" class,="" you="" can="" easily="" run="" and="" delete="" game="" instances="" for="" your="" solver.="" the="" game="" engine="" should="" hold="" all="" the="" relevant="" data="" regarding="" the="" game's="" state.="" this="" includes="" the="" moves="" made,="" the="" player's="" position,="" the="" cells,="" etc.="" you="" should="" call="" read_lines()="" which="" uses="" the="" parse()="" function="" to="" parse="" the="" lines="" in="" the="" file.="" your="" read_lines()="" function="" should="" return="" the="" grid="" as="" well.="" if="" you="" decide="" to="" do="" this="" differently="" however,="" that="" is="" also="" ok!="" cells.py="" it="" is="" recommended="" that="" you="" write="" your="" cells="" here.="" all="" cells="" must="" have="" a="" display="" attribute.="" we="" recommend="" your="" cells="" also="" have="" a="" step()="" method.="" the="" step()="" method="" should="" take="" in="" a="" game="" object="" (defined="" above)="" and="" make="" modifications="" to="" the="" game="" depending="" on="" the="" cell.="" if="" you="" are="" a="" strong="" programmer="" and="" know="" how="" to="" use="" inheritance,="" you="" may="" use="" it.="" using="" inheritance="" will="" not="" advantage="" you="" much="" however,="" and="" the="" assignment="" is="" completely="" doable="" without="" it!="" we="" will="" not="" teach="" it="" in="" this="" course,="" so="" it="" is="" up="" to="" you="" if="" you="" want="" to="" use="" it!="" notable="" cells:="" wall="" cell="" if="" a="" user="" steps="" onto="" a="" wall="" cell,="" the="" user="" should="" be="" pushed="" back="" to="" their="" original="" cell="" and="" the="" message="" you="" walked="" into="" a="" wall.="" oof!="" should="" be="" returned.="" the="" game="" should="" not="" record="" illegal="" user="" moves="" onto="" walls="" or="" out="" of="" bounds!="" water="" cell="" if="" a="" user="" steps="" onto="" a="" water="" cell,="" it="" should="" increment="" the="" player's="" water="" bucket="" count="" and="" return="" the="" message="" thank="" the="" honourable="" furious="" forest,="" you've="" found="" a="" bucket="" of="" water!="" .="" it="" should="" then="" behave="" like="" an="" air="" block.="" fire="" cell="" if="" a="" user="" steps="" onto="" a="" fire="" cell,="" two="" things="" can="" happen:="" if="" the="" user="" has="" at="" least="" one="" water="" bucket,="" it="" should="" return="" the="" message="" with="" your="" strong="" acorn="" arms,="" you="" throw="" a="" water="" bucket="" at="" the="" fire.="" you="" acorn="" roll="" your="" way="" through="" the="" extinguished="" flames!="" and="" reduce="" the="" player's="" water="" bucket="" count="" by="" one.="" the="" fire="" block="" should="" then="" behave="" like="" an="" air="" block.="" if="" the="" user="" does="" not="" have="" a="" water="" bucket,="" it="" should="" return="" the="" message="" you="" step="" into="" the="" fires="" and="" watch="" your="" dreams="" disappear="" :(.="" and="" end="" the="" game.="" af://n157/="" af://n160/="" af://n163/="" af://n164/="" af://n166/="" af://n168/="" teleport="" cell="" if="" a="" user="" steps="" onto="" a="" teleport="" cell,="" it="" should="" teleport="" the="" user="" to="" the="" destination="" and="" return="" the="" message="" whoosh!="" the="" magical="" gates="" break="" physics="" as="" we="" know="" it="" and="" opens="" a="" wormhole="" through="" space="" and="" time.="" .="" if="" a="" user="" waits="" (by="" inputting="" 'e'="" )="" on="" a="" teleport="" cell="" after="" stepping="" on="" one,="" they="" will="" be="" teleported="" again.="" if="" the="" acorn="" is="" currently="" on="" a="" teleport="" pad="" and="" walk="" into="" a="" wall,="" when="" the="" acorn="" is="" pushed="" back,="" it="" does="" not="" re-trigger="" the="" teleport="" pad.="" player.py="" it="" is="" recommend="" that="" you="" write="" your="" player="" class="" here.="" it="" must="" contain="" the="" attribute="" num_water_buckets="" .="" the="" player="" class="" should="" also="" contain="" a="" method="" called="" move(...)="" which="" will="" receive="" a="" move="" command="" and="" move="" the="" player.="" the="" player="" class="" must="" have="" a="" row="" and="" col="" attribute="" which="" represents="" their="" location="" on="" the="" grid.="" the="" grid_to_string()="" function="" must="" use="" these="" attributes="" when="" drawing="" the="" player.="" if="" a="" player="" tries="" to="" leave="" the="" grid="" (say="" there="" was="" a="" hole="" in="" the="" perimeter),="" it="" should="" act="" as="" if="" the="" player="" walked="" into="" a="" wall.="" game_parser.py="" it="" is="" recommended="" that="" you="" write="" your="" parser="" functions="" here.="" a="" parser="" is="" a="" module="" which="" reads="" an="" input="" and="" processes="" it="" into="" something="" useful.="" you="" may="" assume="" that="" the="" input="" grid="" given="" in="" the="" configuration="" file="" is="" a="" rectangle="" (i.e.="" each="" row="" has="" the="" same="" number="" of="" entries).="" you="" may="" also="" assume="" that="" the="" border="" of="" the="" maze="" given="" in="" the="" configuration="" file="" will="" be="" surrounded="" with="" wall="" cells="" (except="" the="" starting="" and="" ending="" cells)!="" your="" parse()="" function="" will="" be="" tested.="" it="" should="" receive="" a="" list="" of="" strings.="" the="" parse()="" function="" must="" be="" able="" to="" handle="" \n="" characters="" at="" the="" end="" of="" each="" string="" in="" the="" input="" list.="" there="" are="" certain="" error="" cases="" it="" must="" be="" able="" to="" handle.="" in="" this="" specific="" order:="" if="" the="" configuration="" file="" contains="" an="" unknown="" letter,="" raise="" a="" valueerror="" with="" message="" bad="" letter="" in="" configuration="" file:="">. . If there are multiple unknown letters, you only need to output a single unknown letter in the message
May 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here