コード例 #1
0
ファイル: Action.php プロジェクト: JJacobi13/jcAiBattle
 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');
 }