Fix counting bug in validate
authorNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:05:38 +0000 (14:05 +0200)
committerNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:05:38 +0000 (14:05 +0200)
erdslangetjie/level.py

index 4f8059e5383d65add9a62b436c0426874ecdcabe..fd039f9e1b59308a12e63de10c1e3fbc61da5224 100644 (file)
@@ -73,9 +73,9 @@ class Level(object):
         exit_points = 0
         for line in self._data:
             if ENTRY in line:
-                entry_points += 1
+                entry_points += line.count(ENTRY)
             if EXIT in line:
-                exit_points += 1
+                exit_points += line.count(EXIT)
         if entry_points == 0:
             raise RuntimeError('No entry point')
         if entry_points > 1: