projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Coregal variant + simplify time management in Game.vue
[vchess.git]
/
client
/
src
/
variants
/
Wildebeest.js
diff --git
a/client/src/variants/Wildebeest.js
b/client/src/variants/Wildebeest.js
index
f4e3b83
..
5bb50e8
100644
(file)
--- a/
client/src/variants/Wildebeest.js
+++ b/
client/src/variants/Wildebeest.js
@@
-2,7
+2,7
@@
import { ChessRules } from "@/base_rules";
import { ArrayFun } from "@/utils/array";
import { sample, randInt } from "@/utils/alea";
import { ArrayFun } from "@/utils/array";
import { sample, randInt } from "@/utils/alea";
-export c
onst VariantRules = c
lass WildebeestRules extends ChessRules {
+export class WildebeestRules extends ChessRules {
static get size() {
return { x: 10, y: 11 };
}
static get size() {
return { x: 10, y: 11 };
}
@@
-225,10
+225,7
@@
export const VariantRules = class WildebeestRules extends ChessRules {
}
getCurrentScore() {
}
getCurrentScore() {
- if (this.atLeastOneMove())
- // game not over
- return "*";
-
+ if (this.atLeastOneMove()) return "*";
// No valid move: game is lost (stalemate is a win)
return this.turn == "w" ? "0-1" : "1-0";
}
// No valid move: game is lost (stalemate is a win)
return this.turn == "w" ? "0-1" : "1-0";
}