def execute(self, key: int, model: Model): padding_len: int = model.get_padding_len() if model.at_field_end(LateralDirection.RIGHT): num_spaces = padding_len else: num_spaces = 1 model.move(LateralDirection.RIGHT, num_spaces)
def execute(self, key: int, model: Model): right = LateralDirection.RIGHT if model.at_field_end(right): model.move( right, model.get_padding_len() + len(model.get_neighbor_field(right))) else: model.move_field_end(right)