bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.UI.Command

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines the commands a user can issue.
Synopsis

Types

Data-types

data Command Source #

The sum-type of commands that a user may issue.

Constructors

Hint

Request a move-suggestion.

Print PrintObject

Print the requested static data.

Quit

Terminate this application.

Report ReportObject

Report on the requested dynamic data.

Resign

Admit defeat.

Restart

Abandon the current game, & start afresh.

RollBack (Maybe NPlies)

Roll-back the optionally specified number of plies.

Save

Persist the current game-state.

Set SetObject

I.E. mutate something.

Swap

Swap options between the two sides; which causes the players to swap sides.

Instances

Instances details
Eq Command Source # 
Instance details

Defined in BishBosh.UI.Command

Methods

(==) :: Command -> Command -> Bool #

(/=) :: Command -> Command -> Bool #

Show Command Source # 
Instance details

Defined in BishBosh.UI.Command

NFData Command Source # 
Instance details

Defined in BishBosh.UI.Command

Methods

rnf :: Command -> () #

Constants

printTag :: String Source #

Input-format.

setTag :: String Source #

Input-format.

usageMessage :: String Source #

A message defining the syntax of the available commands.

Functions

showsCommand :: Command -> ShowS Source #

Shows a command.

issueCommand :: Command -> ShowS Source #

Show the specified command in the format required by this application's parser.

autoComplete :: ShowS Source #

Replace the first word of the specified string with the name of a command of which it is an unambiguous case-insensitive prefix.