Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiplomacyMap<Power, MilitaryBranch>

Map of Diplomacy

Type parameters

  • Power

  • MilitaryBranch

Hierarchy

Index

Constructors

constructor

Properties

locations

locations: Set<Location<Power, MilitaryBranch>>

The set of locations in this map

Private map

map: LabeledUndirectedGraph<Location<Power, MilitaryBranch>, Set<MilitaryBranch>>

The labeled graph that represents the map.

powers

powers: Set<Power>

The set of powers in this map

Private provinceToLocation

provinceToLocation: Map<Province<Power>, Set<Location<Power, MilitaryBranch>>>

provinces

provinces: Set<Province<Power>>

The set of provinces in this map

Methods

locationsOf

  • Parameters

    • province: Province<Power>

      The province

    Returns Set<Location<Power, MilitaryBranch>>

    The set of locations that the province has.

movableLocationsOf

  • movableLocationsOf(location: Location<Power, MilitaryBranch>, militaryBranch: MilitaryBranch): Set<Location<Power, MilitaryBranch>>
  • Parameters

    • location: Location<Power, MilitaryBranch>

      The location

    • militaryBranch: MilitaryBranch

      The military branch

    Returns Set<Location<Power, MilitaryBranch>>

    - The set of locations that the military branch in the location can move.

movableProvincesOf

  • movableProvincesOf(province: Province<Power>, militaryBranch: MilitaryBranch): Set<Province<Power>>
  • Parameters

    • province: Province<Power>

      The province

    • militaryBranch: MilitaryBranch

      The military branch

    Returns Set<Province<Power>>

    The set of provinces that the military branch in the province can move.

Generated using TypeDoc