diff options
| author | jmdejong <jmdejong@users.noreply.github.com> | 2018-01-11 22:44:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-11 22:44:20 +0100 |
| commit | e15a7ee87517e47613473f0a3fcb7fc68f112849 (patch) | |
| tree | 1bb12831bf6d65a895004fcc229e9b7954048892 /asciifarm/client/display/fieldpad.py | |
| parent | e0164e21209cec0ec24e9d25eee90711bca78947 (diff) | |
| parent | 7ba1804af2ec34094171127d6eada72a1d1e199f (diff) | |
Merge pull request #1 from rakiru/code-review
Code review
Diffstat (limited to 'asciifarm/client/display/fieldpad.py')
| -rw-r--r-- | asciifarm/client/display/fieldpad.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asciifarm/client/display/fieldpad.py b/asciifarm/client/display/fieldpad.py index 6619c1f..f64634e 100644 --- a/asciifarm/client/display/fieldpad.py +++ b/asciifarm/client/display/fieldpad.py @@ -29,14 +29,14 @@ class FieldPad: def changeCell(self, x, y, sprites): """ sprites must always have at least one element """ char, colour, bgcolour = sprites[0] - if bgcolour == None: + if bgcolour is None: for (ch, co, bg) in sprites: - if bg != None: + if bg is not None: bgcolour = bg break else: bgcolour = 0 - if colour != None and self.colours: + if colour is not None and self.colours: self.pad.addstr(y, x*self.charSize, char, self.colours.get(colour, bgcolour)) else: self.pad.addstr(y, x*self.charSize, char) |
