diff --git a/src/Command/CommandContainer.php b/src/Command/CommandContainer.php index 38ea7d39..be6748eb 100644 --- a/src/Command/CommandContainer.php +++ b/src/Command/CommandContainer.php @@ -15,7 +15,6 @@ use ChessServer\Command\StartCommand; use ChessServer\Command\StockfishCommand; use ChessServer\Command\TakebackCommand; -use ChessServer\Command\TutorFenCommand; use ChessServer\Command\UndoCommand; class CommandContainer @@ -38,7 +37,6 @@ public function __construct() $this->obj->attach(new StartCommand()); $this->obj->attach(new StockfishCommand()); $this->obj->attach(new TakebackCommand()); - $this->obj->attach(new TutorFenCommand()); $this->obj->attach(new UndoCommand()); } diff --git a/src/Command/TutorFenCommand.php b/src/Command/TutorFenCommand.php deleted file mode 100644 index e74b8227..00000000 --- a/src/Command/TutorFenCommand.php +++ /dev/null @@ -1,33 +0,0 @@ -name = '/tutor_fen'; - $this->description = "Explains a FEN position in terms of chess concepts."; - $this->params = [ - 'fen' => '', - 'variant' => '', - ]; - } - - public function validate(array $argv) - { - return count($argv) - 1 === count($this->params); - } - - public function run(ChesslaBlabSocket $socket, array $argv, int $id) - { - $gameMode = $socket->getGameModeStorage()->getById($id); - - return $socket->getClientStorage()->sendToOne( - $id, - $gameMode->res($argv, $this) - ); - } -} diff --git a/src/Game/AbstractMode.php b/src/Game/AbstractMode.php index 86ad9012..b78433d6 100644 --- a/src/Game/AbstractMode.php +++ b/src/Game/AbstractMode.php @@ -2,14 +2,10 @@ namespace ChessServer\Game; -use Chess\FenToBoardFactory; -use Chess\Tutor\FenEvaluation; -use Chess\Variant\Classical\Board as ClassicalBoard; use ChessServer\Game\Game; use ChessServer\Command\LegalCommand; use ChessServer\Command\PlayLanCommand; use ChessServer\Command\StockfishCommand; -use ChessServer\Command\TutorFenCommand; use ChessServer\Command\UndoCommand; abstract class AbstractMode @@ -89,13 +85,6 @@ public function res($argv, $cmd) ], ]; - case TutorFenCommand::class: - $board = FenToBoardFactory::create($argv[1], new ClassicalBoard()); - $paragraph = (new FenEvaluation($board))->getParagraph(); - return [ - $cmd->name => implode(' ', $paragraph), - ]; - case UndoCommand::class: $board = $this->game->getBoard()->undo(); $this->game->setBoard($board);