aboutsummaryrefslogtreecommitdiff
path: root/graphics.ads
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-12-08 11:06:26 +0100
committerCharles <sircharlesaze@gmail.com>2019-12-08 11:06:26 +0100
commit4b367c25b0365be8fe38381136353a659d5ce545 (patch)
tree8e92a5948c67a58f1fb4ce27f2a73286ed57ed1c /graphics.ads
parent22e73779f55b051d34fc0490fbb55045f3f321d9 (diff)
downloadsnake-4b367c25b0365be8fe38381136353a659d5ce545.tar.gz
snake-4b367c25b0365be8fe38381136353a659d5ce545.tar.bz2
snake-4b367c25b0365be8fe38381136353a659d5ce545.zip
Added direction change with arrow key, food spawn
Diffstat (limited to 'graphics.ads')
-rw-r--r--graphics.ads3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics.ads b/graphics.ads
index 1f58de3..601c3e9 100644
--- a/graphics.ads
+++ b/graphics.ads
@@ -1,4 +1,5 @@
with SDL;
+with SDL.Timers;
with SDL.Video.Windows;
with SDL.Video.Renderers;
with SDL.Video.Palettes;
@@ -14,6 +15,8 @@ package Graphics is
WINDOW_WIDTH: constant SDL.Positive_Dimension := 400;
WINDOW_HEIGHT: constant SDL.Positive_Dimension := 400;
+ TIME_STEP: constant SDL.Timers.Milliseconds := 400;
+
COLOR_WHITE: constant SDL.Video.Palettes.Colour := (255, 255, 255, 255);
COLOR_BLACK: constant SDL.Video.Palettes.Colour := (0, 0, 0, 255);
COLOR_RED: constant SDL.Video.Palettes.Colour := (255, 0, 0, 255);