- bits = (
- (BITS.MSB, 'msb', ()),
- (BITS.YELLOW, 'yellow', ()),
- (BITS.MAGENTA, 'magenta', ()),
- (BITS.CYAN, 'cyan', ()),
- (BITS.WEST, 'arrow', ()),
- (BITS.EAST, 'arrow', ()),
- (BITS.SOUTH, 'arrow', ()),
- (BITS.NORTH, 'arrow', ()),
- )
- for pos, (bit, image, transforms) in enumerate(bits):
- is_set = self.state.player.bits.check_bit(bit)
+
+ health = self.state.gameboard.health
+ max_health = self.state.gameboard.max_health
+ wins = self.state.gameboard.wins
+ wins_required = self.state.gameboard.wins_required
+
+ bits = []
+ bits.extend((i < health, 'health') for i in range(max_health))
+ bits.extend((i < wins, 'win') for i in range(wins_required))
+
+ for pos, (is_set, image) in enumerate(bits):