( Print View )
[Texts & Links]
HW#5 --- last modified November 22 2021 13:18:26.
Due date: Dec 6
Files to be submitted:
Purpose: To gain more experience with functional program and with logic programming.
Related Course Outcomes:
The main course outcomes covered by this assignment are:
CLO11 -- Produce programs in a functional programming language.
For this homework you will write two text-based adventure games - one in Scheme and one in Prolog. As a model for what a text based adventure game is, check out the Wikipedia page for Zork and maybe try to Play Zork Online. The actual subject matter of the text based adventure game you write is up to you (have fun!), however, your programs must meet the following constraints that the grader will use for grading:
- You should have a readme.txt file indicating team mates on your project. It should also indicate where in your programs you satisfy the remaining criteria.
- Name your Scheme program adventure1.scm and your Prolog program adventure2.P. The Prolog program should be a sequel to the Scheme program. The grader will use Chez-Scheme to test your Scheme program and SWI-Prolog to grade your Prolog program. Programs will be launched from a terminal window using the following commands respectively:
It is expected that when launched your programs will display information about the location the play starts off at.
- Call places in your adventure programs Locations. Locations in your Scheme program should be modeled using classes implemented via closures and message passing as was shown in class.
- Each adventure program should have at least 5 Locations.
- Your Locations should have a notion of state. For example, if you move an object at the Location and come back it should stay moved.
- You should have a notion of a Player which also has a state.
- Your Scheme program should make non-trivial use of streams to model I/O somewhere in your program.
- Your Scheme program should be able to save and load the current game state, with the commands: save name_of_some_file and load name_of_some_file.
- Your Prolog program should make non-trivial use of Definite Clause Grammars.
- Your Prolog program should be able to save and load the current game state, with the commands: save name_of_some_file and load name_of_some_file.
|Items 1-10 (1pt each)