From 24a858848573331e9948672691a5b06a8c7f6697 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 12 Oct 2016 22:48:00 +0200 Subject: [PATCH] gears.py: allow zero spokes --- boxes/gears.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boxes/gears.py b/boxes/gears.py index 39c115a..1eb5b1d 100644 --- a/boxes/gears.py +++ b/boxes/gears.py @@ -428,6 +428,9 @@ class Gears(): - if no room (collision) then spokes not drawn """ + if not spokes: + return [] + # Spokes collision = False # assume we draw spokes messages = [] # messages to send back about changes.