Skip to content

Commit

Permalink
Updated FenToBoardFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Feb 18, 2025
1 parent f8a9169 commit cb1c5bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/Game/Blocking/ExtractTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function run()
: new CapablancaFischerBoard((new CapablancaFischerShuffle())->create());
} elseif ($this->params['variant'] === VariantType::CLASSICAL) {
$board = isset($this->params['fen'])
? FenToBoardFactory::create($this->params['fen'])
? ClassicalFenToBoardFactory::create($this->params['fen'])
: new ClassicalBoard();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Command/Game/NonBlocking/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function run(AbstractSocket $socket, array $argv, int $id)
]);
} elseif (StockfishMode::NAME === $params['mode']) {
if (isset($params['settings']['fen'])) {
$board = FenToBoardFactory::create($params['settings']['fen'], new ClassicalBoard());
$board = ClassicalFenToBoardFactory::create($params['settings']['fen']);
$game = (new Game($params['variant'], $params['mode']))->setBoard($board);
} else {
$game = new Game($params['variant'], $params['mode']);
Expand Down

0 comments on commit cb1c5bc

Please sign in to comment.