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?
4007CEM/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.
80 lines (69 sloc)
2 KB
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 | |
// BasketBallGame | |
// | |
// Created by Suraj Mann on 02/03/2020. | |
// Copyright © 2020 Suraj Mann. All rights reserved. | |
// | |
#include <iostream> | |
#include "Menu.h" | |
#include "login.h" | |
#include "NewScreen.h" | |
#include <string> | |
#include <vector> | |
#include <stdlib.h> | |
using namespace std; | |
Menu::Menu() | |
{ | |
} | |
//object method for first menu display - Suraj | |
void Menu::display_Menu() | |
{ | |
cout << "|----------------------------------------------------------------------|" << endl; | |
cout << "|----------------- Welcome To Basketball Simulator! -------------------|" << endl; | |
cout << "|----------------------------------------------------------------------|" << endl; | |
cout << "" << endl; | |
} | |
// object method for first menu screen - Suraj | |
int Menu::first_Menu() | |
{ | |
Login set_user_credentials; | |
Login check_user_credentials; | |
NewScreen clear_screen; | |
int mychoice=0; | |
cout << "Please press 1 to login" << endl; | |
cout << "Please press 2 to create a username/login" << endl; | |
cout << "Please press 3 to close the application" << endl; | |
cin >> mychoice; | |
choice = mychoice; | |
//switch statement to run menu options | |
switch(choice) | |
{ | |
case 1: | |
{ | |
check_user_credentials.check_user_credentials(); | |
//clear_screen.clear_screen(); | |
} | |
break; | |
case 2: | |
{ | |
set_user_credentials.set_user_credentials(); | |
//clear_screen.clear_screen(); | |
} | |
break; | |
case 3: | |
return 0; | |
} | |
return 0; | |
} | |
// Second menu screen - Suraj | |
int Menu::second_Menu() | |
{ | |
string user_team; | |
cout << "" << endl; | |
cout << "Please create your basketball team" << endl; | |
cout << "Team Name: "; cin >> user_team; | |
user_team_list.push_back(user_team); | |
user_team_name = user_team; | |
return 0; | |
} | |