An open API service indexing awesome lists of open source software.

https://github.com/artemis-beta/landsim

Generate Terrain/Land Using Random Number Generation in Python
https://github.com/artemis-beta/landsim

cities python simulation terrain

Last synced: 7 months ago
JSON representation

Generate Terrain/Land Using Random Number Generation in Python

Awesome Lists containing this project

README

          

# landsim
Generate Terrain/Land Using Random Number Generation in Python! To use this module:
```
import landsim as ls

x, y = 30, 30 # Create a map of size 30x30

my_map = ls.map(x, y,
n_cities=20,
n_water=5) # Create map with 20 cities and
# 5 water sources

my_map.add_water_source() # Randomly add another water source

my_map.add_city() # Randomly add a new city

my_map.print_map() # Print map to terminal

my_map.print_layer('cities') # Print only a layer ('land'/'cities')
# the cities layer displays city ids

my_map.get_city_info(i) # Get info for city id=i

my_map.build_station(i) # Build at town id=i

```

## Map Display

![Alt text](./example.png?raw=true "An Example Map")

## Cities View with IDs

![Alt text](./cities_view.png?raw=true "Cities with IDs")