From: Benjamin Auder Date: Wed, 10 Feb 2021 13:43:57 +0000 (+0100) Subject: Improve Spartan, Avalam + Emergo pieces X-Git-Url: https://git.auder.net/doc/html/%7B%7B%20path%28%27mixstore_user_board%27%29%20%7D%7D?a=commitdiff_plain;h=0760d861aac62ed093d95ab86f7226dc6b8d3a70;p=vchess.git Improve Spartan, Avalam + Emergo pieces --- diff --git a/client/public/images/pieces/Avalam/generateSVG.py b/client/public/images/pieces/Avalam/generateSVG.py index 8d526787..746a2be6 100755 --- a/client/public/images/pieces/Avalam/generateSVG.py +++ b/client/public/images/pieces/Avalam/generateSVG.py @@ -12,7 +12,7 @@ black = '') - f.write("\n") + if number >= 1: + f.write(digits[number] + ' fill="none" stroke-width="5" ' + ('stroke="red"' if color == "white" else 'stroke="yellow"') + '/>') + f.write("\n") f.write(final) f.close() diff --git a/client/public/images/pieces/Emergo/generateSVG_composite.py b/client/public/images/pieces/Emergo/generateSVG_composite.py index 1e37f2b6..85726d57 100755 --- a/client/public/images/pieces/Emergo/generateSVG_composite.py +++ b/client/public/images/pieces/Emergo/generateSVG_composite.py @@ -21,7 +21,7 @@ black_bottom = '' digits = { "top": [ - # 1 + # 1 (unused here) '') - f.write("\n") - f.write(digits["bottom"][bottom] + ' fill="none" stroke-width="5" ' + ('stroke="red"' if colorTop == "black" else 'stroke="orange"') + '/>') - f.write("\n") + if top >= 1: + f.write(digits["top"][top] + ' fill="none" stroke-width="5" ' + ('stroke="red"' if colorTop == "white" else 'stroke="orange"') + '/>') + f.write("\n") + if bottom >= 1: + f.write(digits["bottom"][bottom] + ' fill="none" stroke-width="5" ' + ('stroke="red"' if colorTop == "black" else 'stroke="orange"') + '/>') + f.write("\n") f.write(final) f.close() diff --git a/client/public/images/pieces/Emergo/generateSVG_simple.py b/client/public/images/pieces/Emergo/generateSVG_simple.py index fd397af2..c8ef8261 100755 --- a/client/public/images/pieces/Emergo/generateSVG_simple.py +++ b/client/public/images/pieces/Emergo/generateSVG_simple.py @@ -12,7 +12,7 @@ black = '' white = '' digits = [ - # 1 + # 1 (unused) '') - f.write("\n") + if number >= 1: + f.write(digits[number] + ' fill="none" stroke-width="5" ' + ('stroke="red"' if color == "white" else 'stroke="orange"') + '/>') + f.write("\n") f.write(final) f.close() diff --git a/client/public/images/pieces/Spartan/SOURCE b/client/public/images/pieces/Spartan/SOURCE new file mode 100644 index 00000000..c34f13ec --- /dev/null +++ b/client/public/images/pieces/Spartan/SOURCE @@ -0,0 +1,2 @@ +Hoplite pawn drawn from: +https://fr.m.wikipedia.org/wiki/Fichier:OOjs_UI_icon_bell.svg diff --git a/client/public/images/pieces/Spartan/bc.svg b/client/public/images/pieces/Spartan/bc.svg deleted file mode 120000 index f7661a29..00000000 --- a/client/public/images/pieces/Spartan/bc.svg +++ /dev/null @@ -1 +0,0 @@ -../br.svg \ No newline at end of file diff --git a/client/public/images/pieces/Spartan/bc.svg b/client/public/images/pieces/Spartan/bc.svg new file mode 100644 index 00000000..899f4809 --- /dev/null +++ b/client/public/images/pieces/Spartan/bc.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/client/public/images/pieces/Spartan/bg.svg b/client/public/images/pieces/Spartan/bg.svg deleted file mode 120000 index a41e488c..00000000 --- a/client/public/images/pieces/Spartan/bg.svg +++ /dev/null @@ -1 +0,0 @@ -../Schess/be.svg \ No newline at end of file diff --git a/client/public/images/pieces/Spartan/bg.svg b/client/public/images/pieces/Spartan/bg.svg new file mode 100644 index 00000000..ae6789d8 --- /dev/null +++ b/client/public/images/pieces/Spartan/bg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/client/public/images/pieces/Spartan/bl.svg b/client/public/images/pieces/Spartan/bl.svg deleted file mode 120000 index dfaa0688..00000000 --- a/client/public/images/pieces/Spartan/bl.svg +++ /dev/null @@ -1 +0,0 @@ -../bb.svg \ No newline at end of file diff --git a/client/public/images/pieces/Spartan/bl.svg b/client/public/images/pieces/Spartan/bl.svg new file mode 100644 index 00000000..17ba73f9 --- /dev/null +++ b/client/public/images/pieces/Spartan/bl.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/client/public/images/pieces/Spartan/bp.svg b/client/public/images/pieces/Spartan/bp.svg new file mode 100644 index 00000000..30f3063b --- /dev/null +++ b/client/public/images/pieces/Spartan/bp.svg @@ -0,0 +1,68 @@ + + + + + + image/svg+xml + + + + + + + Hoplite + + v + diff --git a/client/src/variants/Spartan.js b/client/src/variants/Spartan.js index 3b4fc771..acab8ad3 100644 --- a/client/src/variants/Spartan.js +++ b/client/src/variants/Spartan.js @@ -12,8 +12,7 @@ export class SpartanRules extends ChessRules { } getPpath(b) { - if ([V.LIEUTENANT, V.GENERAL, V.CAPTAIN, V.WARLORD].includes(b[1])) - return "Spartan/" + b; + if (b[0] == 'b' && b[1] != 'k') return "Spartan/" + b; return b; } diff --git a/server/db/queryGameStat.sql b/server/db/queryGameStat.sql index c1720902..6b8d5a13 100644 --- a/server/db/queryGameStat.sql +++ b/server/db/queryGameStat.sql @@ -1,4 +1,5 @@ select name,total from GameStat g join variants v on g.vid = v.id -where total > 0; +where total > 0 +order by total desc;