I'm having issues with my Rematch condition.

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  void ResetGame(bool doResetPlayers)
{
	char reMatch = ' ';

	bool doResetPlayers = false;

	Draw_Border_MenuFormat();
	cout << MENU_FORMAT_LEFT_BORDER << endl;
	cout << MENU_FORMAT_LEFT_BORDER << "Would you like to go again? press Y for rematch, and N to close the application " << endl;
	cout << MENU_FORMAT_LEFT_BORDER << "Enter your selection: ";
	reMatch = _getch();
	Sleep(200);

		if (reMatch == 'Y' || reMatch == 'y' )
		{
			doResetPlayers = true;
			SetNumberOfPlayers();
		}
		else if (reMatch == 'N' || reMatch == 'n' )
		{
			exit(EXIT_APPLICATION);
		}
		else
		{
			Draw_Border_MenuFormat();

			cout << MENU_FORMAT_LEFT_BORDER << "please be more clear, try either Y or N" << endl;
			cout << MENU_FORMAT_LEFT_BORDER << "Would you like to Rematch Y to begin | N to exit application" << endl;
			cout << MENU_FORMAT_LEFT_BORDER << "Enter your selection: ";
			reMatch = _getch();
			Sleep(200);

		}



}


as of right now its not completed yet, or no where near completed, i'm on part 1 of 4 parts in this homework assignment but i can't seem to overcome this obstacle, could someone point me in the right direction?
I am kind of confused.

I don't see the question or the obstacle that you are seeing. Please repost the question and we will more likely be able to help you.

-Hirokachi
Last edited on
In Part 1, the objective is to reset any data we may be holding on to from our previous game. We will decide what data to reset (reinitialize) based on user input in another area of our code. In this assignment you will need to:
 Create a variable
o Of global scope
o Of type Boolean
o Named isReset
o With a default value of true
 Create a function
o Named ResetGame
o Of type void
o That accepts a Boolean argument
 Named doResetPlayers
o With comment describing the function’s task, to be used as a tooltip.

 Within the function you must decide if the players are to be reset.
 First you will need to clear the console window of any text.
 If doResetPlayers is true (if the user wants to reset the player profiles)
o You will need to set the current number of players to 0.
o Next, you will need to iterate through the elements of the player names and player throws arrays, reinitializing the values in the elements to “NULL” or NULL, pending the array’s data type.
o After that, the variable holding the determination of whether there is a winner needs to be set to false.
o Lastly, the newly created variable isReset needs to be set to true, so that our logic knows our game has been reset.
 If doResetPlayers is false (if the user does NOT want to reset the player profiles)
o The variable holding the determination of whether there is a winner needs to be set to false.
o The newly created variable isReset needs to be set to false, because we are not resetting the player profiles.


this is what i am supposed to do, and my post is what i currently have, i'm unsure of how to clear the console window, or if i should use if-statements or maybe a do-while. i'm pretty much lost all over the place
Hey it looks like you are trying to understand a homework assignment but i think it would be nice if you took a look at the following link:
http://www.cplusplus.com/doc/tutorial/

Also, I am sure that your professor would be glad to help you and explain whatever you need to have explained to you.

One thing that i recommend to you is that you should think about where you aren't understanding some algorithm or some line of code. Please refine your questions. Saying that your lost all over the place may be true but is very difficult for the good people on this forum to help you effectively and efficiently. Please understand, although we are glad and willing to help we have other things to do. So please be mindful of our time and please refine your questions to a specific problem or misunderstanding or your posts may never be answered.
Topic archived. No new replies allowed.