civ_map_generator 0.1.10

A civilization map generator
Documentation
# Civ Map Generator


A Civilization series game map generator library. The algorithm is primarily based on the *Civilization V* implementation, with some references from *Civilization VI*.

## Release Notes


See [Release Notes](https://github.com/lishaoxia1985/civ-map-generator/releases) for version history and changelogs.

## Features


### Dual Hex Orientation Support


Supports both flat and pointy hex orientations. Original Civilization implementations typically support only one orientation, but this project supports both.

## Example


```rust
use civ_map_generator::{generate_map, map_parameters::{MapParametersBuilder, WorldGrid}};

fn main() {
    let world_grid = WorldGrid::default();
    let map_parameters = MapParametersBuilder::new(world_grid).build();
    let map = generate_map(&map_parameters);
}
```

Complete example: [Civilization-Remastered](https://github.com/lishaoxia1985/Civilization-Remastered)

## Documentation


- [How to add a map type]https://github.com/lishaoxia1985/civ-map-generator/blob/master/src/map_generator/How%20to%20add%20a%20map%20type.MD

## Current Limitations


- **Limited Map Generation Algorithms**  
  Only fractal and pangaea maps are currently supported. More algorithms will be added in the future.

- **Hex Grid Only**  
  Square grid support is not yet implemented.

## Future Plans


- Add more map generation algorithms
- Add square grid support
- Optimize JSON-based ruleset information (currently, only a subset of files in `src/jsons` are used as ruleset information)

## References


- [Unciv]https://github.com/yairm210/Unciv
- [Community Patch for Civilization V - Brave New World]https://github.com/LoneGazebo/Community-Patch-DLL
- [Red Blob Games]https://www.redblobgames.com/grids/hexagons/

## License


Licensed under either of

- [Apache License, Version 2.0]http://www.apache.org/licenses/LICENSE-2.0
- [MIT license]http://opensource.org/licenses/MIT

at your option.

### Contributions


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.