Пример #1
0
 public function move(Game $game, $level)
 {
     $forsythe = new Forsythe();
     $oldForsythe = $forsythe->export($game);
     $newForsythe = $this->getNewForsythe($oldForsythe, $level);
     $move = $forsythe->diffToMove($game, $newForsythe);
     return $move;
 }
Пример #2
0
 public function testExportCastling()
 {
     $generator = new Generator();
     $game = $generator->createGame();
     $game->getBoard()->getPieceByKey('a1')->setFirstMove(1);
     $game->getBoard()->getPieceByKey('h8')->setFirstMove(1);
     $manipulator = new Manipulator($game->getBoard());
     $forsythe = new Forsythe();
     $this->assertEquals('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w Kq', $forsythe->export($game));
 }