From ecf9632a91e9da727b978a00c8d231221095fb50 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 19 Mar 2023 15:15:54 +0100 Subject: Propaganda Phase (part 1). --- play.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 44bfddb..d181e5f 100644 --- a/play.js +++ b/play.js @@ -601,8 +601,8 @@ function calc_oppose_bases() { if (view.support[s] < 0) total -= data.spaces[s].pop * view.support[s] } - for (let b = first_piece[FARC][BASE]; b <= last_piece[FARC][BASE]; ++b) - if (b !== AVAILABLE) + for (let p = first_piece[FARC][BASE]; p <= last_piece[FARC][BASE]; ++p) + if (view.pieces[p] !== AVAILABLE) total += 1 return total } @@ -1125,6 +1125,10 @@ function on_log(text) { text = text.substring(3) p.className = "h2 farc" } + else if (text.match(/^\.h2 /)) { + text = text.substring(3) + p.className = "h2" + } else if (text.match(/^\.h3/)) { text = text.substring(4) p.className = "h3" -- cgit v1.2.3