I need Help with my code please

I am new to c++ programming and at the moment I am using windows.h to make a simple RPG game. At the moment I'm having trouble because I want to make sure that the players health can not exceed 10 but im not sure how to do that

#include <iostream>
#include <windows.h>

using namespace std;


char map[20] [20] = {"#################",
"# # # # #",
"# # # # ! #",
"# # # # #",
"#################",
"#################",
"# # # # #",
"# + # # # #",
"# # # # #",
"#################",
"#################",
"# # # # #",
"# # + # # #",
"# # # # #",
"#################",
"#################",
"# # # # #",
"# @ # # # #",
"# # # # #",
"#################"};
int Gamespeed = 50;
int Level = 0;
bool stopgame = false;
int Hp = 10;
int MaxHp = 10;
int Mana = 15;
int MaxMana = 15;
int choice;
int main ()
{
while (stopgame == false)
{
system("cls");
if(Hp <= 0)
{
system("cls");
cout << "You are dead" << endl;
system("pause");
}
if(Hp >= 11 )
{
return false;
}
for (int y = 0; y < 20; y++)
{
cout << map[y] << endl;
}
cout << "Health: " << Hp << "/" << MaxHp << endl;

cout << "Mana: " << Mana << "/" << MaxMana << endl;

I would really aprriciate any help I can get :D
Topic archived. No new replies allowed.