CS-224 Object Oriented Programming and Design Methodologies: 1 Guidelines
CS-224 Object Oriented Programming and Design Methodologies: 1 Guidelines
CS-224 Object Oriented Programming and Design Methodologies: 1 Guidelines
Design Methodologies
Spring 2020
Assignment 2, Jan 26, 2019
1 Guidelines
You need to submit this assignment on 9th of Feb at 8pm as the next assign-
ment will be given on the same day. Some important guidelines about the
assignment are as following:
• Some assignments will require you to submit multiple files. Always Zip
and send them.
• It is better to submit the work that you have done yourself than what
you have plagiarized.
• It is strongly advised that you start working on the assignment the day
you get it. Assignments WILL take time.
1
• DO NOT send your assignment to your instructor, if you do I will just
mark your assignment as ZERO for not following clear instructions.
• You can be called in for Viva for any assignment that you submit
2
2 Legend of SeePlusia
Prince Lazy has been captured by an evil wizard. You are Zeldana, a female
warrior who takes it upon yourself to rescue the prince and return him to
his family. You go off on a quest through the dangerous world of SeePlusia
to search for the three mythical crystals of Objectos. Together the crystals
will give you the power to defeat the wizard and rescue Prince Lazy. The
world of SeePlusia is shown in Fig. 1. It shows the different locations in the
world. The direction of travel between locations is given by an arrow and
the number of apples required to travel from one location to other are also
shown.
The rules of the game of Legend of SeePlusia are as follows.
• You have to save Prince Lazy who is held captive at Wizard’s Castle.
• At each location you can only go in one of four directions: north, south,
east, west.
• If a direction is not shown on the map, it’s an invalid move, e.g. north
from Marsh of the Undead. An invalid move uses up the move and
consumes one apple.
• Before rescuing the prince, you have to collect 3 Objectos crystals from
the indicated locations.
• If you arrive at Sands of Quick, you slowly sink into quicksand and die
and the game is Lost.
• You cannot move past Bridge of Death to Wizard’s Castle unless you
have all three crystals.
• Once you reach Wizards Castle, the Prince is rescued and the game is
Won.
3
• If you run out of food before rescuing the prince, you die of starvation
and the game is Lost.
3 Your Task
A bare-bone implementation is given in Seeplusia folder. You can move the
warrior by arrow keys, and it does some arbitrary operations to demonstrate
how to use the available functions. You have to provide the implementation of
seeplusia.cpp => makeMove (string direction) function in accordance
with the game rules given above. This function is called every time you
press an arrow-key with appropriate direction provided as argument. To
modularize the program, you should add other functions as well in the same
file, that you call in makeMove.
4 Game Status
The bottom-left corner displays the game status that shows:
• Crystals: Initially there are no crystals, but as you find one, you will
increment the nCrystalsFound, and they will be shown next to apples.
5 Available Functions/Parameters
• moveEast() : moves the warrior to East.
4
Figure 1: World of Seeplusia
6 Credits
This assignment is courtesy of Naveed Ejaz.