This lab is worth 10 points and accounts for 12.5 percent of your laboratory grade. The points will be subjectively assigned by your TA based upon whether they believe you made a good faith effort toward complete the tasks that are assigned. Showing up on time, respecting your fellow classmates learning environment, and adherance to laboratory policies also factor into the determination of your score.
The following is an outline of the tasks for you to attempt during the lab period.
A framework containing the files and folders you will need can be found here. Download the .tgz file and decompress it in your account using the command:
tar -xzvf <file_name>
Inside the framework folder you will find a folder named syntax. In this folder, edit the file bowtie.cpp so that it compiles and works correctly.
Inside the framework folder you will find a folder named logic. In this folder, edit the file numguess.cpp so that it compiles and works correctly.
Inside the framework folder you will find a folder named segmentation. In this folder, edit the file sigsegv.cpp so that it compiles and works correctly.
Back before there were real video games, people used to lose hour upon hour playing text based role playing games called MUDs. The basic jist of the games were that you were in some map partitioned into square blocks. From that block you could travel up, down, left, or right into an adjacent block. Sometimes you would run into a wall or find a fiendish dragon or worse in the adjacent cell; at which point you would make the exciting decision of whether to run from or fight with your foe.
A good way of representing the map of the MUD would be to use cell( or block ) objects which contain pointers to their adjacent cells. A wall could be represented by a NULL pointer. The map can be created by declaring a handful of cells which are connected by their pointers.
In the folder MUD write the cell class. Then write a main program which creates a map and lets the user wander around it. Once you have the basic functionality, start adding features. Perhaps each cell can contain either nothing, treasure, or a bottomless pit into which the player falls ( causing the end of the game ).