summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.html21
-rw-r--r--play.js10
-rw-r--r--rules.js50
3 files changed, 7 insertions, 74 deletions
diff --git a/play.html b/play.html
index cbac0f8..3ae9cb4 100644
--- a/play.html
+++ b/play.html
@@ -1125,27 +1125,6 @@ c5 3 13 7 17 8 8 2 9 3 11 12 1 5 5 12 8 16 5 8 5 8 3 22 l-3 14 -30 -1 c-35
</div>
</div>
- <div class="panel_grid">
- <div id="support_discard_panel" class="panel">
- <div id="support_discard_header" class="panel_header">Suffragist Discard</div>
- <div id="support_discard" class="panel_body"></div>
- </div>
- </div>
-
- <div class="panel_grid">
- <div id="opposition_discard_panel" class="panel">
- <div id="opposition_discard_header" class="panel_header">Opposition Discard</div>
- <div id="opposition_discard" class="panel_body"></div>
- </div>
- </div>
-
- <div class="panel_grid">
- <div id="out_of_play_panel" class="panel">
- <div id="out_of_play_header" class="panel_header">Out of Play</div>
- <div id="out_of_play" class="panel_body"></div>
- </div>
- </div>
-
<br><br><br>
<br><br><br>
diff --git a/play.js b/play.js
index cfb83a4..fc16adc 100644
--- a/play.js
+++ b/play.js
@@ -671,12 +671,9 @@ function on_update() { // eslint-disable-line no-unused-vars
document.getElementById("hand").replaceChildren()
document.getElementById("set_aside").replaceChildren()
document.getElementById("support_claimed").replaceChildren()
- document.getElementById("support_discard").replaceChildren()
document.getElementById("opposition_claimed").replaceChildren()
- document.getElementById("opposition_discard").replaceChildren()
document.getElementById("states_draw").replaceChildren()
document.getElementById("strategy_draw").replaceChildren()
- document.getElementById("out_of_play").replaceChildren()
if (view.hand.length) {
document.getElementById("hand_panel").classList.remove("hide")
@@ -696,21 +693,14 @@ function on_update() { // eslint-disable-line no-unused-vars
for (let c of view.support_claimed)
document.getElementById("support_claimed").appendChild(ui.cards[c])
- for (let c of view.support_discard)
- document.getElementById("support_discard").appendChild(ui.cards[c])
for (let c of view.opposition_claimed)
document.getElementById("opposition_claimed").appendChild(ui.cards[c])
- for (let c of view.opposition_discard)
- document.getElementById("opposition_discard").appendChild(ui.cards[c])
for (let c of view.states_draw)
document.getElementById("states_draw").appendChild(ui.cards[c])
for (let c of view.strategy_draw)
document.getElementById("strategy_draw").appendChild(ui.cards[c])
- for (let c of view.out_of_play)
- document.getElementById("out_of_play").appendChild(ui.cards[c])
-
for (let id of ['persistent_turn', 'persistent_game', 'persistent_ballot']) {
const container = document.getElementById(id)
container.replaceChildren()
diff --git a/rules.js b/rules.js
index ddaec92..8ed7ae9 100644
--- a/rules.js
+++ b/rules.js
@@ -155,14 +155,6 @@ function opponent_deck() {
}
}
-function player_discard() {
- if (game.active === SUF) {
- return game.support_discard
- } else {
- return game.opposition_discard
- }
-}
-
function is_player_claimed_card(c) {
return player_claimed().includes(c)
}
@@ -559,20 +551,16 @@ exports.setup = function (seed, _scenario, _options) {
persistent_ballot: [],
support_deck: [],
- support_discard: [],
support_hand: [],
support_set_aside: [],
support_claimed: [],
support_buttons: 0,
opposition_deck: [],
- opposition_discard: [],
opposition_hand: [],
opposition_set_aside: [],
opposition_claimed: [],
opposition_buttons: 0,
-
- out_of_play: []
}
log_h1("Votes for Women")
@@ -598,7 +586,7 @@ function setup_game() {
shuffle(game.states_draw)
shuffle(game.strategy_deck)
- game.out_of_play.push(...game.states_draw.splice(-3)) // 3 states card aren't used
+ game.states_draw.splice(-3) // 3 states card aren't used
log_h2("States Cards")
for (let c of game.states_draw)
log(`C${c}`)
@@ -659,19 +647,15 @@ exports.VIEW_SCHEMA = {
persistent_ballot: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
support_deck: {type: "integer", minimum: 0, maximum: 52},
- support_discard: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
support_hand: {type: "integer", minimum: 1},
support_claimed: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
support_buttons: {type: "integer", minimum: 0, maximum: MAX_SUPPORT_BUTTONS},
opposition_deck: {type: "integer", minimum: 0, maximum: 52},
- opposition_discard: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
opposition_hand: {type: "integer", minimum: 1},
opposition_claimed: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
opposition_buttons: {type: "integer", minimum: 0, maximum: MAX_OPPOSITION_BUTTONS},
- out_of_play: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
-
hand: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
set_aside: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
selected_cards: {type: "array", items: {type: "integer", minimum: 1, maximum: 128}},
@@ -680,8 +664,8 @@ exports.VIEW_SCHEMA = {
required: [
"log", "active", "prompt", "turn", "congress", "us_states", "campaigners",
"strategy_deck", "strategy_draw", "states_draw",
- "support_deck", "support_discard", "support_hand", "support_claimed", "support_buttons",
- "opposition_deck", "opposition_discard", "opposition_hand", "opposition_claimed", "opposition_buttons",
+ "support_deck", "support_hand", "support_claimed", "support_buttons",
+ "opposition_deck", "opposition_hand", "opposition_claimed", "opposition_buttons",
],
additionalProperties: false
@@ -716,19 +700,15 @@ exports.view = function(state, player) {
persistent_ballot: game.persistent_ballot,
support_deck: game.support_deck.length,
- support_discard: game.support_discard, // top_discard?
support_hand: game.support_hand.length,
support_claimed: game.support_claimed,
support_buttons: game.support_buttons,
opposition_deck: game.opposition_deck.length,
- opposition_discard: game.opposition_discard, // top_discard?
opposition_hand: game.opposition_hand.length,
opposition_claimed: game.opposition_claimed,
opposition_buttons: game.opposition_buttons,
- out_of_play: game.out_of_play,
-
hand: [],
set_aside: [],
selected_cards: [],
@@ -978,20 +958,17 @@ function has_player_active_campaigners() {
function remove_claimed_card(c) {
array_remove_item(player_claimed(), c)
- game.out_of_play.push(c)
}
-function discard_card_from_hand(c, is_persistent) {
+function discard_card_from_hand(c) {
array_remove_item(player_hand(), c)
- if (!is_persistent)
- player_discard().push(c)
}
-function end_play_card(c, is_persistent) {
+function end_play_card(c) {
if (is_player_claimed_card(c)) {
remove_claimed_card(c)
} else {
- discard_card_from_hand(c, is_persistent)
+ discard_card_from_hand(c)
}
game.played_card = 0
game.state = "operations_phase"
@@ -1151,18 +1128,6 @@ states.cleanup_phase = {
function discard_persistent_card(cards, c) {
log(`C${c} discarded.`)
array_remove_item(cards, c)
-
- // XXX does it matter where we discard them?
- // I see no value in having multiple discard piles.
- if (is_support_card(c)) {
- game.support_discard.push(c)
- } else if (is_opposition_card(c)) {
- game.opposition_discard.push(c)
- } else if (game.active === SUF) {
- game.support_discard.push(c)
- } else {
- game.opposition_discard.push(c)
- }
}
function end_cleanup_phase() {
@@ -1756,9 +1721,8 @@ function goto_event(c) {
function end_event() {
let c = game.vm.fp
- let is_persistent = game.vm.persistent
game.vm = null
- end_play_card(c, is_persistent)
+ end_play_card(c)
}
function goto_vm(proc) {