- Create new directory for this project
- Download newest osm file from http://www.freemap.sk/index.php?c=core.download&filename=/slovakia.osm/
- Pull this repo
- Create new Posgtres db
- Modify db settings in settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '<your db name>',
'USER': '<your username>',
'PASSWORD': '<your db password>',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
- Load osm file to your db
- run raw SQL (
INITIAL_MIGRATION
) written in settings.py to init db - Locate console to project
- Create project's virtual enviroment
- run
pip install -r requirements.txt
- run
python manage.py runserver
- locate to http://127.0.0.1:8000
- enjoy!
- This game is designed for two players (reds vs. blues)
- A player can do only one action in a single step
- Manipulate population - assign population living in a city / town or village within the selected area on the map to increase a player's score
- Invest - increases area of effect
- Player who controlls most of the country is the winner
- Show three towns (cities) closest to the selected point (only towns (cities) with population higher than 10.000) - educative scenario
- Get portion from non-manipulated area
- Remove polygon from 2nd step from non-manipulated area
- Get population of towns (cities, villages) which are inside the selected polygon from step 2
- Delete non-manipulated area and copy a new polygon of the whole Slovakia as a new non-manipulated area on every refresh of the page (new game)
url: /close_villages
method: GET
get_data: {lat: double, lng: double}
url: /colonise
method: POST
post_data: {lat: double, lng: double, distance: integer}