fix commands
This commit is contained in:
parent
3f0ffc7f1d
commit
8400c52ab6
3 changed files with 4 additions and 8 deletions
|
|
@ -6,7 +6,7 @@ require __DIR__ . '/../autoload.php';
|
||||||
use Lvl0\Countdown\TUI\Commands\FindAnagramWordsCommand;
|
use Lvl0\Countdown\TUI\Commands\FindAnagramWordsCommand;
|
||||||
use Symfony\Component\Console\Application;
|
use Symfony\Component\Console\Application;
|
||||||
|
|
||||||
$application = new Application('Anagram Finder', '1.0.0');
|
$application = new Application('Countdown Letters Solver', '0.1.3');
|
||||||
$application->addCommand(new FindAnagramWordsCommand());
|
$application->addCommand(new FindAnagramWordsCommand());
|
||||||
$application->setDefaultCommand('countdown:letters');
|
$application->setDefaultCommand('countdown:letters');
|
||||||
$application->run();
|
$application->run();
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ require __DIR__ . '/../autoload.php';
|
||||||
use Lvl0\Countdown\TUI\Commands\FindNumbersCommand;
|
use Lvl0\Countdown\TUI\Commands\FindNumbersCommand;
|
||||||
use Symfony\Component\Console\Application;
|
use Symfony\Component\Console\Application;
|
||||||
|
|
||||||
$application = new Application('Countdown numbers Finder', '1.0.0');
|
$application = new Application('Countdown Numbers Solver', '0.1.3');
|
||||||
$application->addCommand(new FindNumbersCommand());
|
$application->addCommand(new FindNumbersCommand());
|
||||||
$application->setDefaultCommand('find-numbers');
|
$application->setDefaultCommand('countdown:numbers');
|
||||||
$application->run();
|
$application->run();
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use function Laravel\Prompts\intro;
|
||||||
use function Laravel\Prompts\spin;
|
use function Laravel\Prompts\spin;
|
||||||
use function Laravel\Prompts\text;
|
use function Laravel\Prompts\text;
|
||||||
|
|
||||||
#[AsCommand(name: 'find-numbers')]
|
#[AsCommand(name: 'countdown:numbers')]
|
||||||
class FindNumbersCommand extends Command
|
class FindNumbersCommand extends Command
|
||||||
{
|
{
|
||||||
public function __invoke(): int
|
public function __invoke(): int
|
||||||
|
|
@ -48,10 +48,6 @@ class FindNumbersCommand extends Command
|
||||||
message: 'Calculating...',
|
message: 'Calculating...',
|
||||||
);
|
);
|
||||||
|
|
||||||
$stepsStr = $result->getSteps()->map(fn(Step $s) => $s->toString());
|
|
||||||
|
|
||||||
// var_dump($stepsStr->toArray());
|
|
||||||
|
|
||||||
$distance = (abs($target - $result->getResult()));
|
$distance = (abs($target - $result->getResult()));
|
||||||
|
|
||||||
callout(
|
callout(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue