From 8dac1a5f79a8e319bc01ca57c866032fa0b15935 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:08:24 +0100 Subject: show cards --- rules.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 6f0e966..dd802ae 100644 --- a/rules.js +++ b/rules.js @@ -59,15 +59,22 @@ exports.setup = function (seed, _scenario, _options) { } log_h1("Votes for Women") + setup_game() + start_turn() + return game +} +function setup_game() { // init card decks & shuffle game.support_deck = init_player_cards(first_support_card) game.support_hand.push(first_support_card) game.opposition_deck = init_player_cards(first_opposition_card) game.opposition_hand.push(first_opposition_card) - for (let c = first_strategy_card; c <= last_strategy_card; ++c) + for (let c = first_strategy_card; c <= last_strategy_card; ++c) { + console.log("PUSH", c) game.strategy_deck.push(c) + } for (let c = first_states_card; c <= last_states_card; ++c) game.states_draw.push(c) @@ -75,11 +82,14 @@ exports.setup = function (seed, _scenario, _options) { shuffle(game.strategy_deck) game.states_draw.splice(-3) // 3 states card aren't used - game.strategy_draw = game.strategy_deck.splice(-3) // draw 3 strategy cards + log_h2("States Cards") + for (let c of game.states_draw) + log(`C${c}`) - game.active = SUF - start_turn() - return game + game.strategy_draw = game.strategy_deck.splice(-3) // draw 3 strategy cards + log_h2("Strategy Cards") + for (let c of game.strategy_draw) + log(`C${c}`) } function init_player_cards(first_card) { @@ -103,6 +113,7 @@ function start_turn() { game.turn += 1 log_h1("Turn " + game.turn) + game.active = SUF goto_planning_phase() } @@ -241,6 +252,7 @@ exports.view = function(state, player) { view = { log: game.log, + active: game.active, prompt: null, actions: null, -- cgit v1.2.3