Project: Write a short work of interactive fiction
Here you will extend your text adventure with muLtiple locations and objects, while also extending the “parser’(the part that interprets the use?s input) to be a bit more flexible. Extend the parser so that the user can type inputs Like GET THE ROCK and the ‘noise word” THE will be removed. Other noise words include AT, IN (as PUT THE ROCK IN THE HOLE ), etc. You should aLso add support for verbs like PUT which require two nouns: an object and a subject. You should also accept bare directions (N ‘I) as a shortcut for GO direction. You might want to add a HELP command to List all the possible commands.Now that we have cLasses and functions, you should be abLe to come up with a way to handLe different commands that is more flexible than just a huge if-else chain, but that’s up to you.BuiLd data structures to represent multiple locations and objects. The player should be able to move between locations (using GO with various directions: compass directions are common, but things like UP.DOWN or even GO TREEHOUSE are possible), interact with object(s) at the current Location, pick up mulpite objects and drop them elsewhere, and manipulate objects in some interesting way.An example might be a Location with a locked door (which, whiLe it is locked, blocks the corresponding direction). A key can be found elsewhere and then the player must UNLOCK DOOR WITH KEY in order tounlock the door. (WITH is a noise word here.) I’m sure you can think of some interesting interactions: the possibilities are literally limitless..Tie the two together with a main Loop that keeps track of the user’s Location, inventory, and other world
state and allows the user to interact with the world.You don’t need to go hog-wiLd here: a half-dozen locations and a few objects, which iteract in some non-trivial way, is sufficient.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
Get Free Quote!
406 Experts Online