Skip to content

Commit

Permalink
Deleted ChessServer\Command\TutorFenCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed May 30, 2024
1 parent 10eb976 commit 0fdd2a6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
2 changes: 0 additions & 2 deletions src/Command/CommandContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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());
}

Expand Down
33 changes: 0 additions & 33 deletions src/Command/TutorFenCommand.php

This file was deleted.

11 changes: 0 additions & 11 deletions src/Game/AbstractMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0fdd2a6

Please sign in to comment.