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:
-
config
Object
Example:
new chess.controller.AnalysisController();
Item Index
Methods
Methods
flipBoard
()
Flip board. The only thing this method does is to fire the flipBoard event.
Returns:
getCurrentModel
()
Return active game
Returns:
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:
loadPreviousGame
()
Load previous game from selected database. For info, see loadNextGame
Returns:
nextMove
()
Go to next move
Returns:
pauseGame
()
Pause auto play of moves
Returns:
playMoves
()
Start auto play of moves in current game from current position
Returns:
previousMove
()
Go to previous move
Returns:
toEnd
()
Go to end of current game
Returns:
toStart
()
Go to start of current game
Returns:
Events
commentAfter
Event fired when the Comment after a move dialog should be shown.
Event Payload:
-
currentModel
chess.model.Game -
move
Object
commentBefore
Event fired when the Comment before a move dialog should be shown.
Event Payload:
-
currentModel
chess.model.Game -
move
Object
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