class GeoWars::Map
- GeoWars::Map
- Reference
- Object
Defined in:
geo_wars/map.crConstant Summary
-
DEFAULT_CELL_SIZE =
64
-
POSSIBLE_MOVES =
(-1..1).flat_map do |x| (-1..1).map do |y| {x: x, y: y} end end.select do |move| !((move[:x] == 0) && (move[:y] == 0)) end
Constructors
Class Method Summary
Instance Method Summary
- #cursor_cell
- #draw
- #editing? : Bool?
- #editor_update(frame_time)
- #flip_terrain
- #load(map_file = "map")
- #new_player_turn
- #save(map_file = "map")
- #selected_unit : Units::Unit | Nil
- #selected_unit=(selected_unit : Units::Unit | Nil)
- #set_terrain(terrain)
- #turn_player : Player
- #turn_player=(turn_player : Player)
- #update(frame_time)
- #update_cells
Constructor Detail
def self.new(cells_x : Int32, cells_y : Int32, players : Array(GeoWars::Player), width = Game::SCREEN_WIDTH, height = Game::SCREEN_HEIGHT, cell_size = DEFAULT_CELL_SIZE, map_file = "map")
#