Files
kondiplo_front/dump_api_res.rb
kontei f25fd6f802
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
CI / system-test (push) Has been cancelled
フロントエンドプレイアブル
2026-02-15 14:57:17 +09:00

22 lines
648 B
Ruby

client = GameApiClient.new
turn1 = Turn.find_by(number: 1)
if turn1
puts "Calling api_calculate_process..."
res = client.api_calculate_process(turn1.game_state, turn1.orders || {})
if res
File.write('api_process_response.json', JSON.pretty_generate(res))
puts "Saved full response to api_process_response.json"
# また、現在のTurn 2のgame_stateの中身も確認
t2 = Turn.find_by(number: 2)
if t2
File.write('db_turn2_game_state.json', JSON.pretty_generate(t2.game_state))
puts "Saved Turn 2 game_state from DB to db_turn2_game_state.json"
end
else
puts "Process failed."
end
end