Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
 def execute(self, key: int, model: Model):
     model.move(VerticalDirection.DOWN)
Exemplo n.º 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)
Exemplo n.º 5
0
 def execute(self, key: int, model: Model):
     model.move(LateralDirection.LEFT)