hangman - size=width;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//The Game of Hangman #include <iostream> #include <string> #include <srand> #include <cstdlib> include <fstream> using namespace std; class Hangman { private int size; //size of text art char gender; //gender of player string guessword; //words guessed by the player string player; //name of player void set_gender(char) const; void set_size(int) const; public void draw_gallow (int); void draw_head(char, int); void draw_body(char, int); void draw_legs(char, int); void guessword (); string word; }; void Hangman::set_size(int width) const {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: size=width; cout&lt;&lt;&quot;Please enter a number to describe the size of object:&quot;; cin&gt;&gt;width; } void Hangman::set_gender(char gender) const { cout&lt;&lt;&quot;What is your gender?&quot;&lt;&lt;endl; &lt;&lt;&quot;Please enter &quot;male&quot; or &quot;female.&quot;&lt;&lt;endl; cin&gt;&gt;gender; } void Hangman::draw_gallow (int size){ } void Hangman::draw_head (char gender, int size){ } void Hangman::draw_body (char gender, int size){ } void Hangman::draw_legs (char gender, int size){ } void Hangman::guessword (string hangman,dat) } int main(){ }...
View Full Document

This document was uploaded on 05/01/2011.

Ask a homework question - tutors are online