Skip to content

Commit

Permalink
Renamed RecognizerCommand as RecognizeCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Feb 4, 2025
1 parent 95e6d05 commit 142452f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use ChessServer\Command\AbstractBlockingCommand;
use ChessServer\Socket\AbstractSocket;

class RecognizerCommand extends AbstractBlockingCommand
class RecognizeCommand extends AbstractBlockingCommand
{
public function __construct()
{
$this->name = '/recognizer';
$this->name = '/recognize';
$this->description = 'Returns the piece placement in FEN format of a Base64 encoded image.';
$this->params = [
'params' => '<string>',
Expand All @@ -25,7 +25,7 @@ public function run(AbstractSocket $socket, array $argv, int $id)
{
$params = $this->params($argv[1]);

$this->pool->add(new RecognizerTask($params))
$this->pool->add(new RecognizeTask($params))
->then(function ($result) use ($socket, $id) {
return $socket->getClientStorage()->send([$id], [
$this->name => $result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Chess\Media\ImgToPiecePlacement;
use ChessServer\Command\AbstractBlockingTask;

class RecognizerTask extends AbstractBlockingTask
class RecognizeTask extends AbstractBlockingTask
{
public function run()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Command/Game/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use ChessServer\Command\Game\Blocking\PlayLanCommand;
use ChessServer\Command\Game\Blocking\PlayRavCommand;
use ChessServer\Command\Game\Blocking\PlotCommand;
use ChessServer\Command\Game\Blocking\RecognizerCommand;
use ChessServer\Command\Game\Blocking\RecognizeCommand;
use ChessServer\Command\Game\Blocking\ResignCommand;
use ChessServer\Command\Game\Blocking\RestartCommand;
use ChessServer\Command\Game\Blocking\StockfishCommand;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function __construct(Pool $pool)
$this->commands->attach((new PlayRavCommand())->setPool($pool));
$this->commands->attach((new PlotCommand())->setPool($pool));
$this->commands->attach(new RandomizerCommand());
$this->commands->attach((new RecognizerCommand())->setPool($pool));
$this->commands->attach((new RecognizeCommand())->setPool($pool));
$this->commands->attach((new ResignCommand())->setPool($pool));
$this->commands->attach((new RestartCommand())->setPool($pool));
$this->commands->attach(new StartCommand());
Expand Down

0 comments on commit 142452f

Please sign in to comment.