Mercurial > rinkhals
changeset 285:e694aa7731ed
Use insert instead of pop, append, append to insert sprite beneath cursor.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 15:36:37 +0000 |
parents | f461fd203e09 |
children | 49418fd43748 |
files | gamelib/tiles.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/tiles.py Sat Sep 05 15:25:57 2009 +0000 +++ b/gamelib/tiles.py Sat Sep 05 15:36:37 2009 +0000 @@ -49,10 +49,8 @@ def append(self, sprite): if self._cursor is not None: - # pop cursor - assert(self._cursor is self.pop()) - list.append(self, sprite) - list.append(self, self._cursor) + assert(self._cursor is self[-1]) + list.insert(self, -1, sprite) else: list.append(self, sprite) sprite.updated = 1