Esempio n. 1
0
 def build(self, target, piece_type, target_coast=None):
     """
     """
     return models.Command(target=target,
                           target_coast=target_coast,
                           piece_type=piece_type,
                           order=self.order,
                           type=CommandType.BUILD)
Esempio n. 2
0
 def hold(self, piece, source):
     """
     """
     return models.Command(
         source=source,
         piece=piece,
         order=self.order,
         type=CommandType.HOLD,
     )
Esempio n. 3
0
 def convoy(self, piece, source, target, aux):
     """
     """
     return models.Command(
         piece=piece,
         source=source,
         target=target,
         aux=aux,
         order=self.order,
         type=CommandType.CONVOY,
     )
Esempio n. 4
0
 def support(self, piece, source, aux, target):
     """
     """
     return models.Command(
         piece=piece,
         source=source,
         target=target,
         aux=aux,
         order=self.order,
         type=CommandType.SUPPORT,
     )
Esempio n. 5
0
 def move(self, piece, source, target, target_coast=None):
     """
     Helper to create a move command.
     """
     return models.Command(
         piece=piece,
         source=source,
         target=target,
         order=self.order,
         target_coast=target_coast,
         type=CommandType.MOVE,
     )