remove unused parameter
This commit is contained in:
parent
b395c6974d
commit
b7945b24f6
@ -42,7 +42,7 @@ export default class PitAnimator {
|
|||||||
this.onBoardViewModelUpdate?.(this.getBoardViewModelFromGame(this.game));
|
this.onBoardViewModelUpdate?.(this.getBoardViewModelFromGame(this.game));
|
||||||
}
|
}
|
||||||
|
|
||||||
public setUpdatedGame(game: MancalaGame, forceClear = false) {
|
public setUpdatedGame(game: MancalaGame) {
|
||||||
this.resetAnimationState();
|
this.resetAnimationState();
|
||||||
if (!this.game) {
|
if (!this.game) {
|
||||||
this.setNewGame(game);
|
this.setNewGame(game);
|
||||||
@ -68,7 +68,7 @@ export default class PitAnimator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onAnimate() {
|
onAnimate() {
|
||||||
if(!this.currentHistoryItem || !this.game || !this.oldBoardViewModel) return;
|
if (!this.currentHistoryItem || !this.game || !this.oldBoardViewModel) return;
|
||||||
if (this.animationIndex === this.currentHistoryItem.gameSteps.length) {
|
if (this.animationIndex === this.currentHistoryItem.gameSteps.length) {
|
||||||
this.clearCurrentInterval();
|
this.clearCurrentInterval();
|
||||||
this.onBoardViewModelUpdate?.(this.getBoardViewModelFromGame(this.game));
|
this.onBoardViewModelUpdate?.(this.getBoardViewModelFromGame(this.game));
|
||||||
@ -92,7 +92,7 @@ export default class PitAnimator {
|
|||||||
boardViewModel: BoardViewModel,
|
boardViewModel: BoardViewModel,
|
||||||
gameStep: GameStep
|
gameStep: GameStep
|
||||||
) {
|
) {
|
||||||
if(!this.currentHistoryItem || !this.game) return;
|
if (!this.currentHistoryItem || !this.game) return;
|
||||||
const pitViewModel = boardViewModel.pits[index];
|
const pitViewModel = boardViewModel.pits[index];
|
||||||
if (this.animationIndex === 0) {
|
if (this.animationIndex === 0) {
|
||||||
//This is one stone move case, TODO: beautify it later
|
//This is one stone move case, TODO: beautify it later
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user