[−][src]Module world_map_gen::land
This module provides representation of cells in a board. And also provides constants for default cells.
extern crate termcolor; use world_map_gen::land::{Land, LandKind}; // You can get default cell let cell = Land::default(); // Also your original cell can be defined let cell = Land { kind: LandKind::Town, char: "[]", color: { let mut c = termcolor::ColorSpec::new(); c.set_fg(Some(termcolor::Color::Black)); c }, altitude: 0, }; // Or you can use preset cells with specifying their altitudes let cell = LandKind::Sea.preset(3); let cell = LandKind::Forest.preset(50); let cell = LandKind::Mountain.preset(80);
Structs
Land | Represents one cell in a board |
Enums
LandKind | Represents the kind of cell. |