sea_round {axisandallies}R Documentation

Sea Round

Description

Simulates one round of sea combat

Usage

sea_round(
  offense_submarines = 0,
  offense_destroyers = 0,
  offense_carriers = 0,
  offense_cruisers = 0,
  offense_battleships = 0,
  offense_fighters = 0,
  offense_bombers = 0,
  defense_submarines = 0,
  defense_destroyers = 0,
  defense_carriers = 0,
  defense_cruisers = 0,
  defense_battleships = 0,
  defense_fighters = 0,
  write_to_console = TRUE
)

Arguments

offense_submarines

Number of submarines on the attacking side, which hit when the dice roll is a 2 or less

offense_destroyers

Number of destroyers on the attacking side, which hit when the dice roll is a 2 or less

offense_carriers

Number of carriers on the attacking side, which hit when the dice roll is a 1

offense_cruisers

Number of cruisers on the attacking side, which hit when the dice roll is a 3 or less

offense_battleships

Number of battleships on the attacking side, which hit when the dice roll is a 4 or less

offense_fighters

Number of fighters on the attacking side, which hit when the dice roll is a 3 or less

offense_bombers

Number of bombers on the attacking side, which hit when the dice roll is a 4 or less

defense_submarines

Number of submarines on the defending side, which hit when the dice roll is a 1

defense_destroyers

Number of destroyers on the defending side, which hit when the dice roll is a 2 or less

defense_carriers

Number of carriers on the defending side, which hit when the dice roll is a 2 or less

defense_cruisers

Number of cruisers on the defending side, which hit when the dice roll is a 3 or less

defense_battleships

Number of battleships on the defending side, which hit when the dice roll is a 4 or less

defense_fighters

Number of fighters on the defending side, which hit when the dice roll is a 4 or less

write_to_console

If true, writes the output to the console, if false, returns as a vector

Value

Number of offensive air hits, offensive submarine hits, offensive other hits, defensive air hits, defensive submarine hits, and defensive other hits in several lines of text

Examples

sea_round(offense_submarines = 1, offense_bombers = 1, defense_battleships = 1)

[Package axisandallies version 0.1.0 Index]