summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js46
1 files changed, 13 insertions, 33 deletions
diff --git a/play.js b/play.js
index 9253d0a..df932ed 100644
--- a/play.js
+++ b/play.js
@@ -581,29 +581,6 @@ function init_ui() {
create_piece_list(MI, TROOPS, "piece mongol cube", 2, 0)
-return
-
- /*
- <div class="piece ds governor" style="left:200px;top:380px"></div>
- <div class="piece bk amir rebel" style="left:230px;top:380px"></div>
- <div class="piece ve raja rebel" style="left:260px;top:380px"></div>
- <div class="piece ds cube" style="left:210px;top:430px"></div>
- <div class="piece mongol cube" style="left:245px;top:430px"></div>
- <div class="piece ds disk" style="left:200px;top:480px"></div>
- <div class="piece bk disk" style="left:250px;top:480px"></div>
- <div class="piece ve disk" style="left:300px;top:480px"></div>
- */
-
-
-
-
- create_piece_list(BK, DISK, "piece ve disk", -4, 10)
- create_piece_list(BK, AMIR, "piece ve amir", 2, 0)
-
- create_piece_list(VE, DISK, "piece ve disk", -4, 10)
- create_piece_list(VE, RAJA, "piece ve raja", 2, 0)
-
- create_piece_list(MI, CUBE, "piece mongol cube", 2, 0)
}
/* UPDATE */
@@ -690,8 +667,8 @@ function layout_pieces(list, xorig, yorig, discs, s) {
layout_piece_rowcol(nrow, ncol, row, col, list[list.length-(++i)], z--)
}
- // if (discs)
- // layout_discs(discs, xorig + off_x, yorig + 12 + off_y, s)
+ if (discs)
+ layout_discs(discs, xorig + off_x, yorig + 12 + off_y, s)
}
function place_piece(p, x, y, z) {
@@ -984,6 +961,9 @@ function on_update() {
action_button("rally", "Rally")
action_button("end_rally", "End Rally")
+ // Decree buttons
+ action_button("build", "Build")
+
action_button("next", "Next")
action_button("undo", "Undo")
@@ -1333,21 +1313,21 @@ function on_log(text) {
text = text.substring(4)
p.className = "h1"
}
- else if (text.match(/^\.h2 Gov/)) {
+ else if (text.match(/^\.h2 Delhi Sultanate/)) {
text = text.substring(3)
- p.className = "h2 govt"
+ p.className = "h2 ds"
}
- else if (text.match(/^\.h2 AUC/)) {
+ else if (text.match(/^\.h2 Bahmani Kingdom/)) {
text = text.substring(3)
- p.className = "h2 auc"
+ p.className = "h2 bk"
}
- else if (text.match(/^\.h2 Cartels/)) {
+ else if (text.match(/^\.h2 Vijayanagara Empire/)) {
text = text.substring(3)
- p.className = "h2 cartels"
+ p.className = "h2 ve"
}
- else if (text.match(/^\.h2 FARC/)) {
+ else if (text.match(/^\.h2 Mongol Invaders/)) {
text = text.substring(3)
- p.className = "h2 farc"
+ p.className = "h2 mi"
}
else if (text.match(/^\.h2 /)) {
text = text.substring(3)