def from_str(cls, strg):
     l_vect = Vector2D.from_list_str(strg)
     if len(l_vect) != 4:
         raise DecodeException("Wrong format for %s : %s" % (cls, strg))
     return cls(state=MobileMixin(position=l_vect[0], vitesse=l_vect[1]),
                action=SoccerAction(acceleration=l_vect[2],
                                    shoot=l_vect[3]))
Пример #2
0
 def from_str(cls, strg):
     l_vect = Vector2D.from_list_str(strg)
     if len(l_vect) != 4: raise DecodeException("Wrong format for %s : %s" % (cls, strg))
     return cls(state=MobileMixin(position=l_vect[0], vitesse=l_vect[1]),
                action=SoccerAction(acceleration=l_vect[2], shoot=l_vect[3]))
 def from_str(cls, strg):
     tmp = Vector2D.from_list_str(strg)
     return cls(tmp[0], tmp[1])
Пример #4
0
 def from_str(cls, strg):
     tmp = Vector2D.from_list_str(strg)
     return cls(tmp[0], tmp[1])