capitalize variable constants
Change-Id: I2e8a61b1ea58fe3a85ee227a6212e0f4ec0dedd6
diff --git a/raspimon_eats.py b/raspimon_eats.py
index e1c7764..18fd8d5 100644
--- a/raspimon_eats.py
+++ b/raspimon_eats.py
@@ -7,11 +7,11 @@
# Variables ---------------------------
raspimon = [2,4]
berries = []
-white = (255, 255, 255)
-blank = (0, 0, 0)
-red = (255, 0, 0)
direction = "right"
-pause = 1.0
+WHITE = (255, 255, 255)
+RED = (255, 0, 0)
+BLANK = (0, 0, 0)
+DELAY = 1.0
# Functions ---------------------------
def move():
@@ -47,8 +47,8 @@
next[1] = raspimon[1] - 1
# Update the position
- sense.set_pixel(raspimon[0], raspimon[1], blank)
- sense.set_pixel(next[0], next[1], white)
+ sense.set_pixel(raspimon[0], raspimon[1], BLANK)
+ sense.set_pixel(next[0], next[1], WHITE)
# If next position is a berry, eat it
if next in berries:
@@ -64,7 +64,7 @@
x = randint(0, 7)
y = randint(0, 7)
new = [x, y]
- sense.set_pixel(x, y, red)
+ sense.set_pixel(x, y, RED)
berries.append(new)
# Main program ------------------------
@@ -76,7 +76,7 @@
while True:
move()
- sleep(pause)
+ sleep(DELAY)
if len(berries) == 0:
break