- return 0
- # DANGEROUS – if anywhere we append a thing to the list of lower
- # ID than the highest-value ID, this might lead to re-using an
- # already active ID. This condition /should/ not be fulfilled
- # anywhere in the code, but if it does, trouble here is one of
- # the more obvious indicators that it does – that's why there's
- # no safeguard here against this.
- return self.things[-1].id_ + 1
+ return 1
+ return max([t.id_ for t in self.things]) + 1
+
+ def get_next_player_char(self):
+ self.player_char_i += 1
+ if self.player_char_i >= len(self.player_chars):
+ self.player_char_i = 0
+ return self.player_chars[self.player_char_i]