]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/snake-game/sprites/sprites.factor
factor: trim using lists
[factor.git] / extra / snake-game / sprites / sprites.factor
index 26ff8438bd0e9c7d08175344747ff6c7d12e4c5c..0ffb4e3cb4396c1c6a61bb53871168fac606e6ed 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2015 Sankaranarayanan Viswanathan.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays assocs byte-vectors formatting fry
-images images.loader kernel locals make math math.vectors
+USING: accessors arrays assocs byte-vectors formatting
+images images.loader kernel make math math.vectors
 opengl.textures sequences ;
 
 IN: snake-game.sprites
@@ -62,3 +62,12 @@ IN: snake-game.sprites
 
 : background-texture ( -- assoc )
     "background" "background.png" load-snake-texture 2array 1array ;
+
+: snake-textures ( -- assoc )
+    [
+        snake-head-textures %%
+        snake-body-textures %%
+        snake-tail-textures %%
+        food-texture %%
+        background-texture %%
+    ] H{ } make ;