示例#1
0
 public function move(Country $from, Country $to)
 {
     if ($from->hasConnectionsTo($to)) {
         return new self(ActionType::move(), $from, $to);
     }
     throw new InvalidActionException('You need to connect your countries to each other before you can move to this country');
 }