Crate n18catalogue

Source
Expand description

Provides tile catalogues and defines common tiles as per the 18xx Tile Database.

§Overview

This module defines a Builder type that assembles tiles into Catalogues, and provides many predefined tiles.

Catalogues define the range of tiles that can be placed on a map, and their availability.

// Construct a small catalogue of standard tiles, identified by name.
let tiles = vec![
    (Kind::_3, Availability::Limited(4)),
    (Kind::_208, Availability::Unlimited),
];
let catalogue = Builder::with_tiles(tiles).unwrap().build();

Structs§

Builder
A builder for constructing tile catalogues.
Catalogue
A tile catalogue is a collection of tiles.

Enums§

Availability
Defines how many copies of a specific tile are available.
Kind
Predefined tiles, named as per the 18xx Tile Database.

Functions§

tile_catalogue
Returns all of the built-in tiles provided by Kind, named as per the 18xx Tile Database.