I am a basic c++ programer :sad: that wants to understand graphics but all the online guides confuse me i understand BASIC c++ code like...
:-|
#include <iostream>
using namespace std;
int main()
{
int forever;
int HIGH = 15;
int LOW = 1;
int HIGH1 = 50;
int LOW1 = 0;
int damage;
int attack;
int HEALTH;
int enemyhealth;
int travle;
int TRYAGAIN;
cout<<"IMPUT YOUR HEALTH\n";
cin>>HEALTH;
cout<<"IMPUT ENEMY HEALTH\n";
cin>>enemyhealth;
cout<<"1";
cin>>forever;
while(forever == 1) {
TRYAGAIN = 0;
damage = rand() % (HIGH - LOW);
attack = rand() % (HIGH1 - LOW1);
travle = attack-damage;
if (travle > 0) {
enemyhealth = enemyhealth-travle;
}
if (travle < 0){
HEALTH = HEALTH+travle;
}
if (HEALTH <0) {
cout<<"YOU HAVE DIED AND GONE NITHER UP NOR DOWN!";
system("Pause");
forever = -1;
cout<<"TRY AGAIN! 1=YES 0=NO";
cin>>TRYAGAIN;
HEALTH = +10;
}
if (enemyhealth <0){
cout<<"YOU HAVE CRUSHED YOUR ENEMY";
system("Pause");
forever = -1;
cout<<"TRY AGAIN! 1=YES 0=NO";
cin>>TRYAGAIN;
enemyhealth = +10;
}
cout<<"DAMMAGE="<<travle<<"\n";
cout<<"YOUR HEALTH="<<HEALTH<<"\n";
cout<<"ENEMY HEALTH="<<enemyhealth<<"\n";
system("Pause\n");
if (TRYAGAIN == 1){
forever = +1;
travle = 0;
TRYAGAIN = 0;
cout<<"IMPUT YOUR HEALTH\n";
cin>>HEALTH;
cout<<"IMPUT ENEMY HEALTH\n";
cin>>enemyhealth;
}
}
cin.get();
}
thats the most complex stuff that i understand...:-|
yeah im using dev c++