From: Neil Date: Mon, 15 Apr 2013 12:53:05 +0000 (+0200) Subject: Tweak level loading code X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=3a3faf0ebde7ba88de6400c2c0ea257ae36a9c6b;p=erdslangetjie.git Tweak level loading code --- diff --git a/erdslangetjie/level.py b/erdslangetjie/level.py index 4dffd6d..645a62f 100644 --- a/erdslangetjie/level.py +++ b/erdslangetjie/level.py @@ -14,7 +14,10 @@ class Level(object): def load(self, levelfile): """Load the level""" self.data = [] - for line in levelfile.readlines(): + # Because of how kivy's coordinate system works, + # we reverse the lines so things match up between + # the file and the display (top of file == top of display) + for line in reversed(levelfile.readlines()): self.data.append(list(line.strip('\n'))) def load_tiles(self):