/**
     * {@inheritDoc}
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('possible-moves');
        $this->setDescription('Calculates all possible moves for a given position');
        $this->addArgument('id', InputArgument::REQUIRED, 'The ID of the game for which the moves must be calculated');
        $this->addArgument('position', InputArgument::REQUIRED, 'The position to calculate the moves for');
        $this->setHelp(<<<EOT
The <info>possible-moves</info> command calculates all possible moves for a piece on a given position
EOT
);
    }
示例#2
0
    /**
     * {@inheritDoc}
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('best-move');
        $this->setDescription('Calculates the best move from a given set of moves');
        $this->addArgument('id', InputArgument::REQUIRED, 'The ID of the game in which the moves would be applied');
        $this->addArgument('moves', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'The moves to select from (as an array of notations)');
        $this->addOption('storage', null, InputOption::VALUE_REQUIRED, 'The type of storage to use to load the game', 'orm');
        $this->setHelp(<<<EOT
The <info>best-move</info> command calculates the best moves from a given set of possible moves
EOT
);
    }