#include #include #include "ai_man.h" using namespace std; ai_entity::ai_entity() { row = 0; col = 0; } bool ai_entity::updaterow(int prow) { if(row < prow) row++; else if(row > prow) row--; if(row == prow) return true; else return false; } bool ai_entity::updatecol(int pcol) { if(col < pcol) col++; else if(col > pcol) col--; if(col == pcol) return true; else return false; } void ai_entity::showposition(int prow, int pcol, bool go) { system("cls"); cout << "Your position: Row-> " << prow << " Col-> " << pcol << endl << endl; cout << "Chaser's Position: Row-> " << row << " Col-> " << col << endl << endl; if(go == true) { cout << "You have been caught"; } getch(); }