Win32 Console Game Help...

Please support our Game Development advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2009
Posts: 1
Reputation: WormSine is an unknown quantity at this point 
Solved Threads: 0
WormSine's Avatar
WormSine WormSine is offline Offline
Newbie Poster

Win32 Console Game Help...

 
0
  #1
Jan 27th, 2009
YES, another person looking for help with ‘Hangman Project’
1. I am not wanting or looking for ANYONE to “DO” my homework for me. *those people irritate me* I’m a big boy and I know my way around the net and not afraid to forum search. “So please leave those comments to yourself.” ~Thanks~

With that being said: Hear we go.

Ok Due to some paperwork snafu’s in the college office, I am currently in an Intermediate Programming course, when I should be in programming basics course.

Needless to say it’s only the 2nd week of class and the project is not due for 7 weeks... So I have time on my side. *too play catch up*

I am using Visual Studio 2008 C++ Win32 Console for the ‘Hangman’ Project

I just started learning about working with Single Classes and Multiple Class Inheritances.
I somewhat understand the class, classes or at least the concept anyway. I am having trouble with the menu and menu options and making them work correctly with a class. Since I have the extra time to learn as much as my spongy brain can within the next 7 weeks, I Wanted to make a title menu with 3 options <example below>


  #include <iostream>
#include <windows.h> // Needed for 'system' (functions)


using namespace std;

 char DoMenu();

int main()
{
	char choice;
	do
	{
		choice = DoMenu();
		
		switch (choice)
		{
		case 'e': 
		case 'E':  break;
		case 'p':  break;
		case 'P':  break;
		}
//*************************************************************
	} while ((choice != 'E') && (choice != 'e')); //used code example from MSDN help files.
//*************************************************************
	return 0;
}
 //Starting point of menu selection
char DoMenu()
{
char MenuChoice;


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////	

  system ( "cls" );										 
    system( "color 0A" );								 

   
	cout << "     #     #                                              \n";      
	cout << "     #     #   ##   #    #  ####  #    #   ##   #    #    \n";	     
                cout << "     #     #  #  #  ##   # #    # ##  ##  #  #  ##   #    \n";	     
	cout << "     ####### #    # # #  # #      # ## # #    # # #  #    \n";	     
	cout << "     #     # ###### #  # # #  ### #    # ###### #  # #    \n";	     
	cout << "     #     # #    # #   ## #    # #    # #    # #   ##    \n";	     
	cout << "     #     # #    # #    #  ####  #    # #    # #    #    \n\n\n\n\n\n\n";     	
                cout << "                       *** Please make your selection ***\n\n";               
    cout << "                          followed by the [Enter] key.\n\n\n\n";
	cout << "                          (P)lay "; cout << "   (M)enu ";cout << "   (E)xit \n\n";
	cout << "                                    Choice... ";
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
cin >> MenuChoice;

return MenuChoice;
}  // End

*[/CODE] did't post it right, oh well you get the idea.[/CODE]
Yes, I know I havn't added my #include "Menu.h" to the Menu yet.

Since I have never even learned about anything on menus, I am just wondering.


QUESTION: I probly should move the case 'e': and some of it, if not all to the class menu and refrence it to here, or would I be wrong in thinking that?

I have seen the Tut's on hangman games, but its not my style. I like to do it on my own. I really could use some advice, maybe to see if I am going the right way or the concept is sound or maybe I am just not seeing it or whatever the reason. I could use some help with some links and maybe some Example code of what I am trying to do.. *does NOT need to work, just showing the concept behind it* I pick up on things fairly well, but for some reason I am just having Coders block and not really sure in which process or steps I need to do to correct this.

Pretty much goes as follows:
Press (P)lay Game

Press (M)enu to goto the 'Actual Menu' witch allows the user to add words, change difficultly or the word from 4 letter words, 5 letter words etc,;

and of course th (E)xit

Since I am cramming all I can into this, *just because I can't afford to drop out and wait a quarter and I am in it for the long haul reguardless.. so I am going to try and tough this quarter out.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 742 | Replies: 0
Thread Tools Search this Thread



Tag cloud for Game Development
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC