From 02d3f166ae0c539729d4c4edaf49f29403200e57 Mon Sep 17 00:00:00 2001 From: mantarias Date: Tue, 28 May 2024 12:42:16 +0200 Subject: [PATCH] changed the test files --- test.carl | 15 +++++---------- test3.carl | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 test3.carl diff --git a/test.carl b/test.carl index fc91ed4..8e0a23e 100644 --- a/test.carl +++ b/test.carl @@ -1,10 +1,5 @@ -var carl:float = 2 -print(carl) - -carl =234234 - - -var size : int = 20 -var map : float[size][size] - -map[2][2] =4.5 \ No newline at end of file +generateMap(20,25) +generateRooms(3,5,7) +generateCorridors() +generateSpawns() +writeToFile() \ No newline at end of file diff --git a/test3.carl b/test3.carl new file mode 100644 index 0000000..3962008 --- /dev/null +++ b/test3.carl @@ -0,0 +1,19 @@ +var size : int = 20 +var map : string[size][size] +var i : int = 0 +var j : int = 0 +while i < size{ + j = 0 + while j < size { + map[i][j] = "w" + j = j+1 + } + i = i+1 +} +generateRooms(3,5,7) +generateCorridors() + +var playerX : int = room.get(0).x .. room.get(0).x + room.get(0).width +var playerY : int = room.get(0).y .. room.get(0).y + room.get(0).height +map[playerY][playerX] = "p" +writeToFile() \ No newline at end of file