projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
173f11d
)
Slightly less buggish Paco-Sako
author
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 3 Jan 2021 15:20:31 +0000
(16:20 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Sun, 3 Jan 2021 15:20:31 +0000
(16:20 +0100)
client/src/base_rules.js
patch
|
blob
|
blame
|
history
client/src/translations/rules/Pacosako/en.pug
patch
|
blob
|
blame
|
history
client/src/translations/rules/Pacosako/es.pug
patch
|
blob
|
blame
|
history
client/src/translations/rules/Pacosako/fr.pug
patch
|
blob
|
blame
|
history
client/src/translations/variants/es.pug
patch
|
blob
|
blame
|
history
client/src/translations/variants/fr.pug
patch
|
blob
|
blame
|
history
client/src/variants/Pacosako.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
e91a43e
..
770561b
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-1071,6
+1071,7
@@
export const ChessRules = class ChessRules {
}
if (
V.OnBoard(rx, ry) &&
}
if (
V.OnBoard(rx, ry) &&
+ this.board[rx][ry] != V.EMPTY &&
this.getPiece(rx, ry) == piece &&
this.getColor(rx, ry) == color
) {
this.getPiece(rx, ry) == piece &&
this.getColor(rx, ry) == color
) {
diff --git
a/client/src/translations/rules/Pacosako/en.pug
b/client/src/translations/rules/Pacosako/en.pug
index
6fe1bc1
..
371b00b
100644
(file)
--- a/
client/src/translations/rules/Pacosako/en.pug
+++ b/
client/src/translations/rules/Pacosako/en.pug
@@
-8,6
+8,6
@@
p
a(href="https://www.youtube.com/watch?v=tQ2JLsFvfxI") Video
| showing gameplay. See also
a(href="http://pacosako.com/") the main website
a(href="https://www.youtube.com/watch?v=tQ2JLsFvfxI") Video
| showing gameplay. See also
a(href="http://pacosako.com/") the main website
- | , and the associated
+ | , and the associated
a(href="http://pacoplay.com/") playing area
| .
a(href="http://pacoplay.com/") playing area
| .
diff --git
a/client/src/translations/rules/Pacosako/es.pug
b/client/src/translations/rules/Pacosako/es.pug
index
6fe1bc1
..
371b00b
100644
(file)
--- a/
client/src/translations/rules/Pacosako/es.pug
+++ b/
client/src/translations/rules/Pacosako/es.pug
@@
-8,6
+8,6
@@
p
a(href="https://www.youtube.com/watch?v=tQ2JLsFvfxI") Video
| showing gameplay. See also
a(href="http://pacosako.com/") the main website
a(href="https://www.youtube.com/watch?v=tQ2JLsFvfxI") Video
| showing gameplay. See also
a(href="http://pacosako.com/") the main website
- | , and the associated
+ | , and the associated
a(href="http://pacoplay.com/") playing area
| .
a(href="http://pacoplay.com/") playing area
| .
diff --git
a/client/src/translations/rules/Pacosako/fr.pug
b/client/src/translations/rules/Pacosako/fr.pug
index
6fe1bc1
..
371b00b
100644
(file)
--- a/
client/src/translations/rules/Pacosako/fr.pug
+++ b/
client/src/translations/rules/Pacosako/fr.pug
@@
-8,6
+8,6
@@
p
a(href="https://www.youtube.com/watch?v=tQ2JLsFvfxI") Video
| showing gameplay. See also
a(href="http://pacosako.com/") the main website
a(href="https://www.youtube.com/watch?v=tQ2JLsFvfxI") Video
| showing gameplay. See also
a(href="http://pacosako.com/") the main website
- | , and the associated
+ | , and the associated
a(href="http://pacoplay.com/") playing area
| .
a(href="http://pacoplay.com/") playing area
| .
diff --git
a/client/src/translations/variants/es.pug
b/client/src/translations/variants/es.pug
index
97e528d
..
0f7ac86
100644
(file)
--- a/
client/src/translations/variants/es.pug
+++ b/
client/src/translations/variants/es.pug
@@
-411,6
+411,7
@@
p.
"Gridolina",
"Hamilton",
"Magnetic",
"Gridolina",
"Hamilton",
"Magnetic",
+ "Pacosako",
"Parachute",
"Takenmake",
"Titan",
"Parachute",
"Takenmake",
"Titan",
diff --git
a/client/src/translations/variants/fr.pug
b/client/src/translations/variants/fr.pug
index
950700d
..
53fcc16
100644
(file)
--- a/
client/src/translations/variants/fr.pug
+++ b/
client/src/translations/variants/fr.pug
@@
-410,6
+410,7
@@
p.
"Gridolina",
"Hamilton",
"Magnetic",
"Gridolina",
"Hamilton",
"Magnetic",
+ "Pacosako",
"Parachute",
"Takenmake",
"Titan",
"Parachute",
"Takenmake",
"Titan",
diff --git
a/client/src/variants/Pacosako.js
b/client/src/variants/Pacosako.js
index
430cfb0
..
e935240
100644
(file)
--- a/
client/src/variants/Pacosako.js
+++ b/
client/src/variants/Pacosako.js
@@
-120,9
+120,6
@@
export class PacosakoRules extends ChessRules {
getPiece(i, j, color) {
const p = this.board[i][j].charAt(1);
getPiece(i, j, color) {
const p = this.board[i][j].charAt(1);
-
-console.log(p);
-
if (ChessRules.PIECES.includes(p)) return p;
const c = this.board[i][j].charAt(0);
// NOTE: this.turn == HACK, but should work...
if (ChessRules.PIECES.includes(p)) return p;
const c = this.board[i][j].charAt(0);
// NOTE: this.turn == HACK, but should work...
@@
-288,6
+285,7
@@
console.log(p);
this.lastMoveEnd.push(Object.assign({}, move.end, { p: released }));
}
V.PlayOnBoard(this.board, move);
this.lastMoveEnd.push(Object.assign({}, move.end, { p: released }));
}
V.PlayOnBoard(this.board, move);
+ this.postPlay(move);
}
undo(move) {
}
undo(move) {
@@
-298,6
+296,7
@@
console.log(p);
this.turn = V.GetOppCol(this.turn);
this.movesCount--;
}
this.turn = V.GetOppCol(this.turn);
this.movesCount--;
}
+ this.postUndo(move);
}
getCurrentScore() {
}
getCurrentScore() {