Skip to content
Permalink
master
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
#include "gymmenu.h"
using namespace std;
void Gym::gymmenu()
{
Sql sql;
PlayerMenu playermenu;
int selection;
cout << "\n===================";
cout << "\n Welcome to the Gym";
cout << "\n===================";
cout << "\n 1 - WeightLifting";
cout << "\n 2 - Cardio";
cout << "\n Enter selection: ";
cin >> selection;
if (selection == 1)
{
cout << "Press Spacebar 6 Times to Weightlift" << endl;
char key = _getch();
int value = key;
int counter = 0;
while (1)
{
key = _getch();
if (key == KEY_SPACE)
{
counter++;
}
if (counter == 4)
{
//cout << "UPDATED" << endl;
sql.updateStrengthTable();
sql.updateDehydrationTable();
break;
}
}
key = _getch();
value = key;
system("cls");
playermenu.ppmenu();
}
else if (selection == 2)
{
char key = _getch();
int value = key;
int counter = 0;
while (1)
{
key = _getch();
if (key == KEY_SPACE)
{
counter++;
}
if (counter == 4)
{
sql.updateDehydrationTable();
sql.updateStaminaTable();
break;
}
}
key = _getch();
value = key;
system("cls");
playermenu.ppmenu();
}
else {
cout << "\n Invalid selection";
}
}