bishbosh-0.0.0.3: Plays chess.

Safe HaskellNone
LanguageHaskell2010

BishBosh.UI.Command

Contents

Description

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

Synopsis

Types

Data-types

data Command x y Source #

The commands that a user may issue.

Constructors

Hint

Request a move-suggestion.

Print PrintObject

Show the value of the specified object.

Quit

Terminate ths application.

Resign

Admit defeat.

Restart

Abandon the current game, & start afresh.

RollBack (Maybe NMoves)

Roll-back the specified number of plies.

Save

Persist the current game-state.

Set SetObject

I.E. mutate a configuration-value.

Swap

Swap evaluation-options between the two sides.

Instances

Eq (Command x y) Source # 

Methods

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

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

Show (Command x y) Source # 

Methods

showsPrec :: Int -> Command x y -> ShowS #

show :: Command x y -> String #

showList :: [Command x y] -> ShowS #

NFData (Command x y) Source # 

Methods

rnf :: Command x y -> () #

Constants

commandPrefix :: Char Source #

Used to distinguish a command from a move.

printTag :: String Source #

Input-format.

setTag :: String Source #

Input-format.

usageMessage :: String Source #

A message defining the syntax of the available commands.

Functions

readsCommand :: String -> Either String (Command x y, String) Source #

Reads a command.

showsCommand :: Command x y -> ShowS Source #

Shows a command.

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.