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.

61 lines
1.8 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 = 16
configuration = {
"teams_width": 4,
"teams_height": 4,
"width_per_team": 30,
"height_per_team": 30,
"born_per_round": [1],
# 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}. ")