19 lines
631 B
Python
Executable File
19 lines
631 B
Python
Executable File
from common import *
|
|
from server import load_game_data
|
|
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, 1, 1, 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")
|