You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.9 KiB

#!/usr/bin/env python3
from hra.game import logic_by_mode
import hra.db as db
import hra.lib as lib
from datetime import datetime
import sys
from sqlalchemy import exc, update
ses = db.get_session()
name="Hlavní hra"
mode = "occupy"
teams_count = 12
configuration = {
"teams_width": 4,
"teams_height": 3,
"width_per_team": 24,
"height_per_team": 24,
# "born_per_round": [1],
"initial_remaining_rounds": 540,
"spawn_price": 10,
"last_spawn": 100,
# seed=5
"hills": [
".xx....x......................",
".xxx...xx.....................",
"...x...............x......x...",
".......xx..........xx.........",
".......xx.....................",
".......x......................",
"..............................",
".............xxx......xx......",
".............xx.......xx......",
"......................xx......",
"...xx....x............x.......",
"...xx....xx...................",
"..............................",
"......x.......................",
".....x........................",
".x............................",
".x.....................x......",
".x....................xx......",
"......................xx......",
"..xx...................x......",
".xxx..........................",
"..............................",
"............xxx......xx.......",
"............xx.......xx.......",
".......................x......",
".....x........x........x......",
"..............xxx........x....",
"..............................",
".............x................",
"............xx................"
]
}
g = lib.create_game(mode=mode, teams_count=teams_count, configuration=configuration, name=name)
ses.commit()
print(f"Přidána hra {g.game_id}. ")