class Risk::Territory

Defined in:

risk/territory.cr

Constant Summary

OutlineDefaultColor = SF::Color::White
OutlineHoverColor = SF::Color.new(255, 0, 255)
SelectedDarkenColor = SF::Color.new(0, 0, 0, 160)
TextColor = SF::Color::White

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, continent : String, x : Int32, y : Int32, width : Int32, height : Int32, unit_cx = 16, unit_cy = 16, connections : Array(String) = [] of String, player : Risk::Player = Player.empty, units = 0) #

[View source]

Instance Method Detail

def check_hover(mouse_coords) #

[View source]
def clear_hover #

[View source]
def connected?(territory : Territory) #

[View source]
def connections : Array(String) #

[View source]
def continent : String #

[View source]
def draw(window) #

[View source]
def draw_selected(window) #

[View source]
def draw_units(window) #

[View source]
def empty? #

[View source]
def height : Int32 #

[View source]
def hover?(mouse_coords) #

[View source]
def hover? : Bool #

[View source]
def image : SF::Image #

[View source]
def inside_bounds?(mouse_coords) #

[View source]
def name : String #

[View source]
def player : Player #

[View source]
def player=(player : Player) #

[View source]
def player?(player : Player) #

[View source]
def select #

[View source]
def selected? : Bool #

[View source]
def sprite : SF::Sprite #

[View source]
def sprite_outline : SF::Sprite #

[View source]
def text : SF::Text #

[View source]
def units : Int32 #

[View source]
def units=(units : Int32) #

[View source]
def unselect #

[View source]
def width : Int32 #

[View source]
def x : Int32 #

[View source]
def y : Int32 #

[View source]