COMMON_PYLINT = --rcfile=/dev/null --reports=n \
--msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
--dummy-variables-rgx='^_'
-PYLINTOPTS = $(COMMON_PYLINT) --disable=C0103,C0111,C0113,C1001,C0301,C0302,C0321,C0325,C0326,C0410,C1801,E1120,R0101,R0902,R0903,R0911,R0912,R0914,R0915,R0916,R1705,R1706,R1710,W0110,W0123,W0141,W0312,W0603,W0611
+PYLINTOPTS = $(COMMON_PYLINT) --disable=C0103,C0111,C0113,C1001,C0301,C0302,C0321,C0325,C0326,C0410,C1801,E1120,R0101,R0902,R0903,R0911,R0912,R0914,R0915,R0916,R1705,R1706,R1710,W0110,W0123,W0141,W0232,W0312,W0603,W0611
pylint:
@pylint --output-format=parseable $(PYLINTOPTS) sst.py
class randomizer:
# LCG PRNG parameters tested against
- # Knuth vol. 2. by the authors of ADVENT
+ # Knuth vol. 2. by the authors of ADVENT
LCG_A = 1093
LCG_C = 221587
LCG_M = 1048576
def random():
old_x = game.lcg_x
game.lcg_x = (randomizer.LCG_A * game.lcg_x + randomizer.LCG_C) % randomizer.LCG_M
- return old_x / randomizer.LCG_M;
+ return old_x / randomizer.LCG_M
@staticmethod
def withprob(p):
return self.roundtogrid() % QUADSIZE
def scatter(self):
s = Coord()
- s.i = self.i + rnd.range(-1, 2)
- s.j = self.j + rnd.range(-1, 2)
+ s.i = self.i + rnd.integer(-1, 2)
+ s.j = self.j + rnd.integer(-1, 2)
return s
def __str__(self):
if self.i is None or self.j is None: