Question: Part B: Refactor World into a Class (35% = 15% test program + 10% code + 10% documentation] Refactor the world type to be an
Part B: Refactor World into a Class (35% = 15% test program + 10% code + 10% documentation] Refactor the world type to be an encapsulated class, and change it to use Locations instead of row and column pairs. The 2D node array and the 1D description array will become member variables. The functions associated with the world type will become member functions. By the end of Part B, your World type will have public member functions with the following prototypes: . . . . . . . World (const string& game_name); void debugPrint () const; bool isValid (const Location& location) const; bool isDeath (const Location& location) const; bool
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
