diff --git a/src/animation/PitAnimator.ts b/src/animation/PitAnimator.ts index 38cf540..2f4d442 100644 --- a/src/animation/PitAnimator.ts +++ b/src/animation/PitAnimator.ts @@ -42,7 +42,7 @@ export default class PitAnimator { this.onBoardViewModelUpdate?.(this.getBoardViewModelFromGame(this.game)); } - public setUpdatedGame(game: MancalaGame, forceClear = false) { + public setUpdatedGame(game: MancalaGame) { this.resetAnimationState(); if (!this.game) { this.setNewGame(game); @@ -68,7 +68,7 @@ export default class PitAnimator { } onAnimate() { - if(!this.currentHistoryItem || !this.game || !this.oldBoardViewModel) return; + if (!this.currentHistoryItem || !this.game || !this.oldBoardViewModel) return; if (this.animationIndex === this.currentHistoryItem.gameSteps.length) { this.clearCurrentInterval(); this.onBoardViewModelUpdate?.(this.getBoardViewModelFromGame(this.game)); @@ -92,7 +92,7 @@ export default class PitAnimator { boardViewModel: BoardViewModel, gameStep: GameStep ) { - if(!this.currentHistoryItem || !this.game) return; + if (!this.currentHistoryItem || !this.game) return; const pitViewModel = boardViewModel.pits[index]; if (this.animationIndex === 0) { //This is one stone move case, TODO: beautify it later