API Docs for: 0.0.2
Show:

chess.controller.AnalysisController Class

Special controller for analysis boards. It extends chess.controller.Controller but calls the enableDragAndDrop method of the board when the events "setPosition", "nextmove" and "newMove" is fired by current game model.

Constructor

chess.controller.AnalysisController

(
  • config
)

Parameters:

Example:

new chess.controller.AnalysisController();

Methods

addMove

(
  • move
)

Add a move to current model

Parameters:

Returns:

undefined

flipBoard

()

Flip board. The only thing this method does is to fire the flipBoard event.

Returns:

undefined

getCurrentModel

()

Return active game

Returns:

object chess.model.Game

loadNextGame

()

Load next game in selected database. This method will only work if you have a grid with list of games. The only thing this method does is to fire the "nextGame" event which the list of games grid listens to. The grid will go to next game and fire it's selectGame event

Returns:

undefined

loadPreviousGame

()

Load previous game from selected database. For info, see loadNextGame

Returns:

undefined

nextMove

()

Go to next move

Returns:

undefined

pauseGame

()

Pause auto play of moves

Returns:

undefined

playMoves

()

Start auto play of moves in current game from current position

Returns:

undefined

previousMove

()

Go to previous move

Returns:

undefined

selectDatabase

(
  • database
)

Select a database

Parameters:

toEnd

()

Go to end of current game

Returns:

undefined

toStart

()

Go to start of current game

Returns:

undefined

Events

commentAfter

Event fired when the Comment after a move dialog should be shown.

Event Payload:

commentBefore

Event fired when the Comment before a move dialog should be shown.

Event Payload:

flip

flip event. A board is example of a view listening to this event. When it's fired, the board will be flipped

newGameDialog

New game dialog event

nextGame

next game event

selectDatabase

Select database event

Event Payload: