projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix and complete Apocalypse variant
[vchess.git]
/
client
/
src
/
variants
/
Ball.js
diff --git
a/client/src/variants/Ball.js
b/client/src/variants/Ball.js
index
1bb7731
..
85e33e6
100644
(file)
--- a/
client/src/variants/Ball.js
+++ b/
client/src/variants/Ball.js
@@
-14,12
+14,9
@@
export class BallRules extends ChessRules {
static get HasFlags() {
return false;
}
static get HasFlags() {
return false;
}
- static get HasCastle() {
- return false;
- }
static get CHAMPION() {
static get CHAMPION() {
- return '
h
';
+ return '
c
';
}
static get BALL() {
}
static get BALL() {
@@
-38,10
+35,10
@@
export class BallRules extends ChessRules {
'p': 's',
'r': 'u',
'n': 'o',
'p': 's',
'r': 'u',
'n': 'o',
- 'b': '
c
',
+ 'b': '
d
',
'q': 't',
'k': 'l',
'q': 't',
'k': 'l',
- '
h': 'd
'
+ '
c': 'h
'
};
}
};
}
@@
-50,10
+47,10
@@
export class BallRules extends ChessRules {
's': 'p',
'u': 'r',
'o': 'n',
's': 'p',
'u': 'r',
'o': 'n',
- '
c
': 'b',
+ '
d
': 'b',
't': 'q',
'l': 'k',
't': 'q',
'l': 'k',
- '
d': 'h
'
+ '
h': 'c
'
};
}
};
}
@@
-128,7
+125,7
@@
export class BallRules extends ChessRules {
static GenRandInitFen(randomness) {
if (randomness == 0)
static GenRandInitFen(randomness) {
if (randomness == 0)
- return "rnb
hqhnbr/ppppppppp/9/9/4a4/9/9/PPPPPPPPP/RNBHQH
NBR w 0 -";
+ return "rnb
cqcnbr/ppppppppp/9/9/4a4/9/9/PPPPPPPPP/RNBCQC
NBR w 0 -";
let pieces = { w: new Array(9), b: new Array(9) };
for (let c of ["w", "b"]) {
let pieces = { w: new Array(9), b: new Array(9) };
for (let c of ["w", "b"]) {
@@
-139,7
+136,7
@@
export class BallRules extends ChessRules {
// Get random squares for every piece, totally freely
let positions = shuffle(ArrayFun.range(9));
// Get random squares for every piece, totally freely
let positions = shuffle(ArrayFun.range(9));
- const composition = ['b', 'b', 'r', 'r', 'n', 'n', '
h', 'h
', 'q'];
+ const composition = ['b', 'b', 'r', 'r', 'n', 'n', '
c', 'c
', 'q'];
const rem2 = positions[0] % 2;
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
const rem2 = positions[0] % 2;
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
@@
-178,7
+175,7
@@
export class BallRules extends ChessRules {
ChessRules.steps,
// Add champion moves
{
ChessRules.steps,
// Add champion moves
{
-
h
: [
+
c
: [
[-2, -2],
[-2, 0],
[-2, 2],
[-2, -2],
[-2, 0],
[-2, 2],
@@
-323,11
+320,11
@@
export class BallRules extends ChessRules {
static get VALUES() {
return {
p: 1,
static get VALUES() {
return {
p: 1,
- r:
5
,
- n:
3
,
- b:
3
,
- q:
9
,
-
h
: 4,
+ r:
3
,
+ n:
4
,
+ b:
2
,
+ q:
5
,
+
c
: 4,
a: 0 //ball: neutral
};
}
a: 0 //ball: neutral
};
}