summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-15 22:55:56 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commit2d1f76aca97aeaa097e062fdb57764c30b797ac5 (patch)
tree17a3c39ee1a2250f033cfebd6d4e165c14f1b79c /rules.js
parentb796e7eaa8c903fea688e5affa24a98f5e929212 (diff)
downloadshores-of-tripoli-2d1f76aca97aeaa097e062fdb57764c30b797ac5.tar.gz
tripoli: Show tournament rule scoring points.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index 04571a5..ca2d8a5 100644
--- a/rules.js
+++ b/rules.js
@@ -1,11 +1,5 @@
"use strict";
-// [x]: summarize naval movements
-// [x]: summarize pirate raids
-// [ ]: summarize naval bombardments
-// [ ]: summarize naval combat
-// [ ]: summarize ground combat
-
const US = "United States";
const TR = "Tripolitania";
@@ -2782,6 +2776,8 @@ exports.resign = function (state, current) {
exports.view = function(state, current) {
game = state;
+ let tr_score = count_american_frigates(TRIPOLITAN_SUPPLY) * 3 + game.tr.gold;
+
let view = {
log: game.log,
year: game.year,
@@ -2797,12 +2793,14 @@ exports.view = function(state, current) {
discard: game.tr.discard.length + (game.tr.queue ? game.tr.queue.length : 0),
hand: game.tr.hand.length,
gold: game.tr.gold,
+ score: tr_score,
},
us: {
core: game.us.core,
draw: game.us.draw.length,
discard: game.us.discard.length + (game.us.queue ? game.us.queue.length : 0),
hand: game.us.hand.length,
+ score: 30 - tr_score,
},
card: game.active_card,
removed: game.removed,