summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-29 12:56:08 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-30 21:59:25 +0200
commit10aa091f9e759cb6250bda3726b2ea0b9fd31b56 (patch)
tree15ed223f4385d9333cfc080eb35f56c8fd6fa1bd
parent062a063c718a6ebce89f93e6f4bbacfc8cceafef (diff)
downloadfriedrich-10aa091f9e759cb6250bda3726b2ea0b9fd31b56.tar.gz
cleanups
-rw-r--r--rules.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/rules.js b/rules.js
index f90b5c4..d364ed5 100644
--- a/rules.js
+++ b/rules.js
@@ -1523,8 +1523,6 @@ function move_general_to(to) {
}
}
- log(">to S" + to)
-
// eliminate supply train
for (let p of all_enemy_trains[pow]) {
if (game.pos[p] === to) {
@@ -1545,10 +1543,6 @@ function move_general_to(to) {
}
function move_general_immediately(to) {
- log_selected()
- log(">from S" + game.pos[game.selected[0]])
- log(">to S", to)
-
for (let p of game.selected)
game.pos[p] = to
@@ -1728,6 +1722,8 @@ states.move_general = {
log(">from S" + from)
}
+ log(">to S" + to)
+
if (!set_has(data.cities.major_roads[from], to))
game.major = 0
@@ -3712,7 +3708,6 @@ states.austria_may_move_laudon_by_one_city_immediately = {
let here = game.pos[GEN_LAUDON]
for (let next of data.cities.adjacent[here])
- // TODO: may capture supply trains?
if (can_move_general_to(next))
gen_action_space(next)
@@ -3735,7 +3730,11 @@ states.austria_may_move_laudon_by_one_city_immediately = {
},
space(s) {
push_undo()
- // no conquest, but may capture supply trains?
+
+ log_selected()
+ log(">from S" + game.pos[game.selected[0]])
+ log(">to S", to)
+
move_general_immediately(s)
game.state = "laudon_done"
},