Files
basegame-vcko/vckonline.py
Luke Esau 3d6b1927bf fixes #37
added monster special payout mechanics
2023-05-10 13:24:24 -07:00

20 lines
636 B
Python
Executable File

import json
import shortuuid
import uuid
from game import *
player1_id = shortuuid.uuid()
player2_id = shortuuid.uuid()
player1 = Player(player1_id, "Player 1")
player2 = Player(player2_id, "Player 2")
player_list = [player1, player2]
try:
base1_new_game_state = load_game_data(str(uuid.uuid4()), "base1", player_list)
game = Game(base1_new_game_state)
game.slay_monster(player1_id, 14, 0, 0)
game.harvest_phase()
game_json = json.dumps(game, cls=GameObjectEncoder, indent=2)
with open("game_state.txt", "w") as dump:
dump.write(game_json)
except ValueError:
print("Error: Failed to load game data")