-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunner.cpp
More file actions
49 lines (43 loc) · 774 Bytes
/
runner.cpp
File metadata and controls
49 lines (43 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include "Mouse.h"
#include "movingFunctions.h"
using namespace std;
void setup(){
int i = 0;
while(i<60){
while(!(X == GOAL_X && Y == GOAL_Y)){
newTile();
printf("%d %d\n%d moves\n", X,Y,i);
i++;
}
printf("%d moves used\n", i);
printf("Memorized maze:\n");
for(int j = 0; j<mazeSize; j++){
printf(" _");
}
for(int m = 0; m<mazeSize; m++){
printf("\n");
for(int n=0; n<mazeSize+1; n++){
if(vMaze[m][n] == -1){
printf("|");
}
else{
printf(" ");
}
if(hMaze[m+1][n] == -1 && n != mazeSize){
printf("_");
}
else{
printf(" ");
}
}
}
printf("\n");
for(int m = 0; m<mazeSize; m++){
printf("\n");
for(int n=0; n<mazeSize+1; n++){
printf("%d ", maze[m][n]);
}
}
printf("\n\n");
}