summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js49
1 files changed, 26 insertions, 23 deletions
diff --git a/play.js b/play.js
index b87f53f..75591c1 100644
--- a/play.js
+++ b/play.js
@@ -445,28 +445,28 @@ function has_removed_all_pieces(pow) {
function on_init() {
ui.pieces = [
- create_piece("piece", 0, "piece cylinder france_1"),
- create_piece("piece", 1, "piece cylinder france_2"),
- create_piece("piece", 2, "piece cylinder france_3"),
- create_piece("piece", 3, "piece cylinder france_4"),
- create_piece("piece", 4, "piece cylinder france_5"),
- create_piece("piece", 5, "piece cylinder bavaria_1"),
-
- create_piece("piece", 6, "piece cylinder prussia_1"),
- create_piece("piece", 7, "piece cylinder prussia_2"),
- create_piece("piece", 8, "piece cylinder prussia_3"),
- create_piece("piece", 9, "piece cylinder prussia_4"),
- create_piece("piece", 10, "piece cylinder saxony_1"),
- create_piece("piece", 11, "piece cylinder pragmatic_1"),
- create_piece("piece", 12, "piece cylinder pragmatic_2"),
- create_piece("piece", 13, "piece cylinder pragmatic_3"),
-
- create_piece("piece", 14, "piece cylinder austria_1"),
- create_piece("piece", 15, "piece cylinder austria_2"),
- create_piece("piece", 16, "piece cylinder austria_3"),
- create_piece("piece", 17, "piece cylinder austria_4"),
- create_piece("piece", 18, "piece cylinder austria_5"),
- create_piece("piece", 19, "piece cylinder austria_6"),
+ create_piece("piece", 0, "piece cylinder france france_1"),
+ create_piece("piece", 1, "piece cylinder france france_2"),
+ create_piece("piece", 2, "piece cylinder france france_3"),
+ create_piece("piece", 3, "piece cylinder france france_4"),
+ create_piece("piece", 4, "piece cylinder france france_5"),
+ create_piece("piece", 5, "piece cylinder bavaria bavaria_1"),
+
+ create_piece("piece", 6, "piece cylinder prussia prussia_1"),
+ create_piece("piece", 7, "piece cylinder prussia prussia_2"),
+ create_piece("piece", 8, "piece cylinder prussia prussia_3"),
+ create_piece("piece", 9, "piece cylinder prussia prussia_4"),
+ create_piece("piece", 10, "piece cylinder saxony saxony_1"),
+ create_piece("piece", 11, "piece cylinder pragmatic pragmatic_1"),
+ create_piece("piece", 12, "piece cylinder pragmatic pragmatic_2"),
+ create_piece("piece", 13, "piece cylinder pragmatic pragmatic_3"),
+
+ create_piece("piece", 14, "piece cylinder austria austria_1"),
+ create_piece("piece", 15, "piece cylinder austria austria_2"),
+ create_piece("piece", 16, "piece cylinder austria austria_3"),
+ create_piece("piece", 17, "piece cylinder austria austria_4"),
+ create_piece("piece", 18, "piece cylinder austria austria_5"),
+ create_piece("piece", 19, "piece cylinder austria austria_6"),
create_piece("piece", 20, "piece cube france"),
create_piece("piece", 21, "piece cube france"),
@@ -1108,7 +1108,10 @@ function on_log(text) {
}
else if (text.startsWith("=")) {
p.className = "h " + power_class[text[1]]
- text = power_name[text[1]]
+ if (text.length === 2)
+ text = power_name[text[1]]
+ else
+ text = text.substring(2)
}
else if (text.startsWith("@")) {
p.className = "move_tip"