ExitCmd

object ExitCmd : CommandImpl<Game>

Command to exit the Reversi CLI application.

Before exiting, the current game is automatically saved if:

  • The game has a name assigned, OR

  • The user chooses to provide a name when prompted

Usage: exit or quit or q

Properties

Link copied to clipboard
open override val info: CommandInfo

Functions

Link copied to clipboard

Prompts the user to provide a name for saving the current game.

Link copied to clipboard
open override fun execute(vararg args: String, context: Game?): CommandResult<Game>

Executes the exit command, saving the game if necessary and closing the application.