{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

wheel_skeleton.cpp

# wheel_skeleton.cpp - Author Brian Choi([email protected] CS...

This preview shows pages 1–3. Sign up to view the full content.

// Author: Brian Choi ([email protected]) // CS 31 Practice. #include <cassert> #include <cctype> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <iostream> #include <vector> using namespace std; class WheelOfFortune { public: WheelOfFortune(const char* puzzle); ~WheelOfFortune(); bool resetPuzzle(const char* puzzle); int guess(char c); bool solvePuzzle(const char* puzzle); void printPuzzle() const; bool solved() const; private: bool validPuzzle(const char* puzzle) const; char* m_solution; // Solution. char* m_solvedPuzzle; // (Maybe partially) solved puzzle. }; WheelOfFortune::WheelOfFortune(const char* puzzle) { m_solution = NULL; m_solvedPuzzle = NULL; assert(resetPuzzle(puzzle)); // Initial puzzle must be valid. } WheelOfFortune::~WheelOfFortune() { // TODO: Implement the destructor. } bool WheelOfFortune::resetPuzzle(const char* puzzle) { if (validPuzzle(puzzle)) { // TODO: If "puzzle" is a valid word puzzle, reset the solution and // m_solvedPuzzle, and return true. Otherwise, don't do anything and return // false. return true; } return false;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
} int WheelOfFortune::guess(char c) { // If c is not a letter, return 0.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

wheel_skeleton.cpp - Author Brian Choi([email protected] CS...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online