API Docs for: 0.0.2
Show:

chess.view.buttonbar.Game Class

Extends View
Module: View

Displays a row of button used for navigation in a game(previous move, next move etc.)

Methods

disableButton

(
  • buttonType
)
private

Disable a button

Parameters:

enableButton

(
  • buttonType
)
private

Enable a button

Parameters:

endOfBranch

() private

Method executed when going to last move in main line or a variation. It will disable the "To end", "Next move", "Start autoplay" and "Pause autoplay" buttons.

hideButton

(
  • buttonType
)
private

Hide a button

Parameters:

notEndOfBranch

(
  • model
)
private

Method executed when moving from last move in a line to a move which is not the last move in a line. It will enable the "To end" and "Next move" buttons. If model is not in auto play mode, it will also enable the "Play" button and hide the "Pause" button.

Parameters:

  • model game.model.Game

notStartOfBranch

() private

Method executed when going from first move in a line to a move which is not the first. It will enable the "To start" and previous buttons.

showButton

(
  • buttonType
)
private

Show a button

Parameters:

startAutoPlay

() private

Method executed when auto play is started. It will enable and show the pause button and hide the play button

startOfGame

() private

Method executed after moving to start of game. It will disable the "to start" and "previous" move buttons

stopAutoPlay

() private

Method executed when auto play is stopped. It will show the play button and hide the pause button. If current move on board is last move in main line or a variation, the play button will be disabled