2014 Semester 1 Assignment 2 1 Assignment 2 Purpose: Practice with C++ classes. Problem to solve: Write a game, named “Alice in the Wonderland”. The player must help Alice to find the Exit while evading the Monster in wonderland. There are only limited moves for Alice to get out from the wonderland. Here is an example of the running program. When Alice successfully found the exit, 2014 Semester 1 Assignment 2 2 When Monster get to Alice, When there is no moves left, Alice begins her quest from the top-left corner of the map (represented with a “A”). She must find the exit (represented with a “E”) at the bottom-right corner. There are 3 Monsters (represented with “M”) each starting from a random location on the map and wander at random. In every step, the user can chose to move Alice in 8 directions (north-west, north, north-east, west, east, south-west, south and south-east). She can also stay at the same place. However, Alice cannot move off the map. The 3 monsters start at random locations on the map (not at where Alice and Exit located) and wander at random in every step. However, they can only move diagonally (north-west, north-east, south-west, south-east). They can occupy the same space but cannot move off the map. The player win if Alice successfully find the exit, display a message and the program terminate. If the monsters get to Alice, display GameOver and the program terminate. There are only limited moves (15) for Alice to find the exit. Display the number of remaining moves in each step. If running out of moves, display a message and the program terminate. The map is 10 space in width and 5 space in height. Display all Names and student ID of team members when the program first started like in the example. You may create a displayInfo() for that, void displayInfo() { cout << "=====================================" << endl; cout << " Mickey Mouse 12345678 " << endl; cout << " Donald Duck 23456789 " << endl; cout << " 159.234 Assignment 2 2014 S1 Albany...

  • 10 years ago
Practice with C++ classes A+ Tutorial use as guide
NOT RATED

Purchase the answer to view it

  • practice_with_c_classes.txt