class Risk::Manager
- Risk::Manager
- Reference
- Object
Defined in:
risk/manager.crConstant Summary
-
AttackPhases =
[:select, :choose_dice, :attack, :move]
-
HeldTerritoriesRatio =
3
-
MinDraftUnits =
3
-
Phases =
[:order, :allocate_territories, :allocate_armies, :turns]
-
TurnPhases =
[:predraft, :draft, :attack, :fortify]
Constructors
Instance Method Summary
- #allocate_armies(mouse, mouse_coords)
- #allocate_army(territory)
- #allocate_territories(mouse, mouse_coords)
- #allocate_territory(territory)
- #attack_attack(keys)
- #attack_back_to_select
- #attack_choose_dice(keys)
- #attack_move(keys, mouse, mouse_coords)
- #attack_phase : Symbol
- #attack_phase_index : UInt8
- #attack_select(keys, mouse, mouse_coords)
- #attacked? : Bool
- #attacker_dice : UInt8
- #attacker_losses : UInt8
- #attacker_max_dice : UInt8
- #attacker_values : Array(UInt8)
- #auto_allocate_armies? : Bool
- #auto_allocate_army(territory)
- #auto_allocate_territories? : Bool
- #auto_allocate_territory(territory)
- #checks_mouse_hover(territories, mouse_coords)
- #clear_mouse_hover
- #defender_dice : UInt8
- #defender_losses : UInt8
- #defender_values : Array(UInt8)
- #determine_order
- #draft(mouse, mouse_coords)
- #exit? : Bool
- #fortify(keys, mouse, mouse_coords)
- #map : Map
- #next_attack_phase
- #next_phase
- #next_turn
- #next_turn_phase
- #phase : Symbol
- #phase_index : UInt8
- #player : Player
- #players : Array(Player)
- #predraft
- #random_dice_roll
- #set_dice
- #turn_index : UInt8
- #turn_phase : Symbol
- #turn_phase_index : UInt8
- #update(frame_time, keys, mouse, mouse_coords)
Constructor Detail
def self.new(players : Array(Risk::Player), map : Risk::Map, auto_allocate_territories : Bool = true, auto_allocate_armies : Bool = true)
#