Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ALL-Project-2-Text-Based-Game-Blackmail-/menu.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (34 sloc)
925 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///menu.cpp | |
#include "menu.h" | |
Main_menu::Main_menu() | |
{ | |
player_input = 0; | |
} | |
bool Main_menu::choice() | |
{ | |
if (player_input == 0){ | |
///this if statement is purely for testing purpouses, if the test specifies player_input value, the code will ignore the if statement | |
///it is required because this function has input | |
cout<<""<<endl<<">>>>BARE CHESTS NINJA SOLO<<<<"<<endl<<endl; | |
cout<<"1: NEW GAME"<<endl; | |
cout<<"2: LOAD GAME"<<endl; | |
cout<<"3: QUIT"<<endl; | |
cout<<">"; | |
cin >> player_input; | |
} | |
switch(player_input) | |
{ | |
case 1: | |
return true; | |
case 2: | |
cout<<endl<<"This feature is not implemented, starting a new game\n"; | |
return true; | |
case 3: | |
return false; | |
} | |
return false; | |
} | |
void Main_menu::setter(int value) | |
{ | |
player_input = value; | |
} |