projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Doublearmy. Start thinking about Dynamo
[xogo.git]
/
variants
/
Hex
/
class.js
diff --git
a/variants/Hex/class.js
b/variants/Hex/class.js
index
1919bc8
..
05200be
100644
(file)
--- a/
variants/Hex/class.js
+++ b/
variants/Hex/class.js
@@
-66,7
+66,7
@@
export default class HexRules extends AbstractClickFillRules {
new PiPo({
x: coords.x,
y: coords.y,
new PiPo({
x: coords.x,
y: coords.y,
- c: C.GetOpp
Col
(this.turn),
+ c: C.GetOpp
Turn
(this.turn),
p: 'p'
})
);
p: 'p'
})
);
@@
-78,7
+78,7
@@
export default class HexRules extends AbstractClickFillRules {
// NOTE: size.x == size.y (square boards)
const emptyCount = C.FenEmptySquares(this.size.x);
return {
// NOTE: size.x == size.y (square boards)
const emptyCount = C.FenEmptySquares(this.size.x);
return {
- fen: (emptyCount + "/").repeat(this.size.x
).slice(0, -1) + " w 0"
,
+ fen: (emptyCount + "/").repeat(this.size.x
- 1) + emptyCount
,
o: {}
};
}
o: {}
};
}
@@
-168,11
+168,11
@@
export default class HexRules extends AbstractClickFillRules {
play(move) {
this.playOnBoard(move);
this.movesCount++;
play(move) {
this.playOnBoard(move);
this.movesCount++;
- this.turn = C.GetOpp
Col
(this.turn);
+ this.turn = C.GetOpp
Turn
(this.turn);
}
}
- getCurrentScore(
move
) {
- const oppCol = C.GetOpp
Col
(this.turn);
+ getCurrentScore() {
+ const oppCol = C.GetOpp
Turn
(this.turn);
// Search for connecting path of opp color:
let explored = {}, component;
let min, max;
// Search for connecting path of opp color:
let explored = {}, component;
let min, max;
@@
-187,7
+187,7
@@
export default class HexRules extends AbstractClickFillRules {
max = z;
explored[index] = true;
component[index] = true;
max = z;
explored[index] = true;
component[index] = true;
- for (let [dx, dy] of super.pieces()['k'].
moves
[0].steps) {
+ for (let [dx, dy] of super.pieces()['k'].
both
[0].steps) {
const [nx, ny] = [x + dx, y + dy];
const nidx = getIndex(nx, ny);
if (
const [nx, ny] = [x + dx, y + dy];
const nidx = getIndex(nx, ny);
if (