Merge pull request #4 from jhalitaksoy/feature/gr-double-stone-in-pit
Feature/GameRule double stone in pit
This commit is contained in:
commit
595f1ca2a6
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mancala-frontend",
|
"name": "mancala-frontend",
|
||||||
"version": "0.1.3-beta.3",
|
"version": "0.1.3-beta.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -15,7 +15,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"mancala.js": "^0.0.2-beta.1",
|
"mancala.js": "^0.0.2-beta.2",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import {
|
|||||||
GAME_STEP_LAST_STONE_IN_EMPTY_PIT,
|
GAME_STEP_LAST_STONE_IN_EMPTY_PIT,
|
||||||
GAME_STEP_BOARD_CLEARED,
|
GAME_STEP_BOARD_CLEARED,
|
||||||
GAME_STEP_LAST_STONE_IN_BANK,
|
GAME_STEP_LAST_STONE_IN_BANK,
|
||||||
|
GAME_STEP_DOUBLE_STONE_IN_PIT,
|
||||||
} from "mancala.js";
|
} from "mancala.js";
|
||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
import { Context } from "../context";
|
import { Context } from "../context";
|
||||||
@ -123,6 +124,11 @@ export default class PitAnimator {
|
|||||||
oppositePitViewModel.pitColor = theme.pitGetRivalStonePitAnimateColor;
|
oppositePitViewModel.pitColor = theme.pitGetRivalStonePitAnimateColor;
|
||||||
oppositePitViewModel.stoneCount = 0;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3378,10 +3378,10 @@ magic-string@^0.22.4:
|
|||||||
dependencies:
|
dependencies:
|
||||||
vlq "^0.2.2"
|
vlq "^0.2.2"
|
||||||
|
|
||||||
mancala.js@^0.0.2-beta.1:
|
mancala.js@^0.0.2-beta.2:
|
||||||
version "0.0.2-beta.1"
|
version "0.0.2-beta.2"
|
||||||
resolved "https://registry.yarnpkg.com/mancala.js/-/mancala.js-0.0.2-beta.1.tgz#333d613b349e743a00141d231e1f49ab1f99b4fe"
|
resolved "https://registry.yarnpkg.com/mancala.js/-/mancala.js-0.0.2-beta.2.tgz#18d9c88355dc269e3a450cadc6891c7560f38f87"
|
||||||
integrity sha512-RS5DFYOjcKMONqZ4DsZudscN+2OhcRBJV2fX3KjqGBvREgMjCxDZVjFMhdZxnP5HFXdRSbUeMivyisGGGQbJ/A==
|
integrity sha512-wA6C0ukPd9rzCcjh5mHG5OTp4ij8bd4dT2+IvlX70DVhlTl0oQgF/rmIBRKvUyNsceFdPhH7q98Vsxm84/RKiw==
|
||||||
|
|
||||||
map-cache@^0.2.2:
|
map-cache@^0.2.2:
|
||||||
version "0.2.2"
|
version "0.2.2"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user