summaryrefslogtreecommitdiff
path: root/test.adb
diff options
context:
space:
mode:
authorrexim <reximkut@gmail.com>2024-03-13 03:02:04 +0700
committerrexim <reximkut@gmail.com>2024-03-13 03:02:04 +0700
commitd423d6b72a9e3ed65ca61526cb2241e6817abe8a (patch)
tree942c739053cfd4089a3362d8e7188fc45f458555 /test.adb
parent01b8983609824162c41fc8ec937f02d1ff221845 (diff)
Implement Shrek Path Finding
Diffstat (limited to 'test.adb')
-rw-r--r--test.adb21
1 files changed, 11 insertions, 10 deletions
diff --git a/test.adb b/test.adb
index 3501009..3c1ce14 100644
--- a/test.adb
+++ b/test.adb
@@ -1,17 +1,18 @@
with Text_IO; use Text_IO;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Ada.Strings; use Ada.Strings;
+with Ada.Containers.Vectors;
procedure Test is
- type Item_Kind is (Key, Bomb);
-
- type Item(Kind: Item_Kind) is record
- case Kind is
- when Key => null;
- when Bomb =>
- Cooldown: Integer;
- end case;
- end record;
+ package Queue is new
+ Ada.Containers.Vectors(Index_Type => Natural, Element_Type => Integer);
+ Q: Queue.Vector;
begin
- null;
+ for Index in 1..10 loop
+ Q.Append(Index);
+ end loop;
+ while not Q.Is_Empty loop
+ Put_Line(Integer'Image(Q(0)));
+ Q.Delete_First;
+ end loop;
end;