From 68f8614bff1800a60286e8c3400df0b3e8675008 Mon Sep 17 00:00:00 2001 From: "Dimitros Protopapas (protopad)" Date: Mon, 2 Mar 2020 10:46:08 +0000 Subject: [PATCH] sorry guys hope this might be useful. --- win condition project.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 win condition project.txt diff --git a/win condition project.txt b/win condition project.txt new file mode 100644 index 0000000..5f3d781 --- /dev/null +++ b/win condition project.txt @@ -0,0 +1,13 @@ +bool WinCondition(n,i,j,EnemiesAlive) +{ EnemiesAlive = false; + for (int i=0;i<15;i++) + { + for (int n = 0; n< 15 ; n++) + for (int j = 0 ; j < 2 ; j++) + { + if ((monsterArray[j].x == i) && (monsterArray[i].y == j) && (monsterArray[j].Alive)) EnemiesAlive = true; + } + } +if(EnemiesAlive == false) + std::cout<<"You Win!!"; +} \ No newline at end of file