self.required_bits = frozenset(bits)
self.data = data
+ def get_text(self):
+ return self.TEXT % self.data
+
def check_available(self, player):
return player.bits.check_bits(self.required_bits)
class ShiftLocations(LocationAction):
- # TODO: Direction parameter in TEXT.
- TEXT = "Shift board locations."
+ TEXT = "Shift board locations %(direction)s."
def perform_action(self, board, location):
board.shift_locations(self.data['direction'])
self.surface.blit(img, (0, y_offset))
y_offset += 8
text = TextBoxWidget(
- (12, y_offset), action.TEXT,
+ (12, y_offset), action.get_text(),
box_width=(INFO_SIZE[0] - 12) // EIGHT_BIT_SCALE,
fontsize=28)
text.render(self.surface)