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
- Host: GitHub
- URL: https://github.com/artemis-beta/landsim
- Owner: artemis-beta
- License: gpl-3.0
- Created: 2017-11-19T16:39:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-17T23:10:29.000Z (over 5 years ago)
- Last Synced: 2025-01-12T00:26:24.603Z (9 months ago)
- Topics: cities, python, simulation, terrain
- Language: Python
- Size: 1.37 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# landsim
Generate Terrain/Land Using Random Number Generation in Python! To use this module:
```
import landsim as lsx, 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 sourcesmy_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 idsmy_map.get_city_info(i) # Get info for city id=i
my_map.build_station(i) # Build at town id=i
```
## Map Display

## Cities View with IDs
