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
#ifndef ENCOUNTER_H_
#define ENCOUNTER_H_
#include <iostream>
#include "fight.h"
#include "run.h"
#include "sql.h"
using namespace std;
void encounter(){
string query = "SELECT ID FROM Enemies";
vector<string> res;
res = sql_call(query);
for(string i : res){
cout << "qwert"<<endl;
}
int strength = 10, speed = 5, hp = 20;
int monsterStrength = 5, monsterSpeed = 7, monsterHp = 3;
string monsterName = "Kraken", monsterDesc = "A Kraken encircles the ship!";
cout << monsterDesc << endl;
cout << "Do you - " << endl << "1.fight or " << endl << "2. Run" << endl;
int choice;
bool cont = true;
while(cont){
cin >> choice;
if (choice==1){
fight(strength,speed,hp,monsterStrength,monsterSpeed,monsterHp,
monsterName, monsterDesc);
cont = false;
}else if(choice==2){
run(strength,speed,hp,monsterStrength,monsterSpeed,monsterHp,
monsterName, monsterDesc);
cont = false;
}else{
cout << "Enter a number 1 or 2: " << endl;
}
}
}
#endif