[explorer] Remove the unused starting command; add aliases to make (m) and place (p)
This commit is contained in:
parent
85c1a395c4
commit
10ba21f7e3
1 changed files with 2 additions and 1 deletions
|
@ -46,6 +46,7 @@ fn command_line() -> Command {
|
||||||
Command::new("make")
|
Command::new("make")
|
||||||
.arg(Arg::new("from").required(true))
|
.arg(Arg::new("from").required(true))
|
||||||
.arg(Arg::new("to").required(true))
|
.arg(Arg::new("to").required(true))
|
||||||
|
.alias("m")
|
||||||
.about("Make a move"),
|
.about("Make a move"),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
|
@ -53,6 +54,7 @@ fn command_line() -> Command {
|
||||||
.arg(Arg::new("color").required(true))
|
.arg(Arg::new("color").required(true))
|
||||||
.arg(Arg::new("piece").required(true))
|
.arg(Arg::new("piece").required(true))
|
||||||
.arg(Arg::new("square").required(true))
|
.arg(Arg::new("square").required(true))
|
||||||
|
.alias("p")
|
||||||
.about("Place a piece on the board"),
|
.about("Place a piece on the board"),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
|
@ -78,7 +80,6 @@ fn command_line() -> Command {
|
||||||
)
|
)
|
||||||
.subcommand(Command::new("print").about("Print the board"))
|
.subcommand(Command::new("print").about("Print the board"))
|
||||||
.subcommand(Command::new("quit").alias("exit").about("Quit the program"))
|
.subcommand(Command::new("quit").alias("exit").about("Quit the program"))
|
||||||
.subcommand(Command::new("starting").about("Reset the board to the starting position"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Error, Eq, PartialEq)]
|
#[derive(Clone, Debug, Error, Eq, PartialEq)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue