Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def execute(self, key: int, model: Model):
     model.move(VerticalDirection.DOWN)
Пример #4
0
 def execute(self, key: int, model: Model):
     left = LateralDirection.LEFT
     if model.at_field_end(left):
         model.move(left, model.get_neighbor_column_width(left))
     else:
         model.move_field_end(left)
Пример #5
0
 def execute(self, key: int, model: Model):
     model.move(LateralDirection.LEFT)