Skip to content
Permalink
6fe9f288d6
Switch branches/tags

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?
Go to file
 
 
Cannot retrieve contributors at this time
80 lines (69 sloc) 2 KB
//
// 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;
}