play_1942se_battle: Play one battle

Description Usage Arguments Details Value Examples

View source: R/1942.R

Description

Plays one battle following the rules for Axis and Allies 1942 second edition

Usage

1
2
3
4
5
6
7
play_1942se_battle(
  oolAttacker,
  oolDefender,
  retreat = NULL,
  verbose = F,
  suppressChecks = F
)

Arguments

oolAttacker

character() order of loss for attacker

oolDefender

character() order of loss for defender

retreat

integer() round number after which attacker should retreat, if NULL, round number will not trigger retreat

verbose

logical() whether to print battle information to stdout

suppressChecks

suppressChecks on input

Details

units for oolAttacker and oolDefender accepts all units specified in ool

In addition to the standard options, the attacker and defender OOL supports the directives:

SUBM

Submarines submerge at first opportunity when all units preceeding this directive is lost.

In addition to the standard options, the attacker OOL supports the directives:

RET

Attacker will retreat when all units preceeding this directive is lost.

Value

list() with members

unitsAttacker

remaining units for attacker, formatted as oolAttacker

unitsDefender

remaining units for defender, formatted as oolDefender

Examples

1
 play_1942se_battle(c("inf", "art", "ftr"), c("inf", "inf", "inf", "AA"))

edvinf/aaSimulator documentation built on June 1, 2020, 12:10 p.m.