update pit animator
This commit is contained in:
parent
1273c64532
commit
30bbd01212
@ -6,6 +6,7 @@ import {
|
||||
GAME_STEP_LAST_STONE_IN_EMPTY_PIT,
|
||||
GAME_STEP_BOARD_CLEARED,
|
||||
GAME_STEP_LAST_STONE_IN_BANK,
|
||||
GAME_STEP_DOUBLE_STONE_IN_PIT,
|
||||
} from "mancala.js";
|
||||
import { v4 } from "uuid";
|
||||
import { Context } from "../context";
|
||||
@ -123,6 +124,11 @@ export default class PitAnimator {
|
||||
oppositePitViewModel.pitColor = theme.pitGetRivalStonePitAnimateColor;
|
||||
oppositePitViewModel.stoneCount = 0;
|
||||
}
|
||||
} else if (gameStep.type === GAME_STEP_DOUBLE_STONE_IN_PIT) {
|
||||
const _index = this.game.board.getPitIndexCircularly(index);
|
||||
const pitViewModel = boardViewModel.pits[_index];
|
||||
pitViewModel.pitColor = theme.pitGetRivalStonePitAnimateColor;
|
||||
pitViewModel.stoneCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user