フロントエンドプレイアブル
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

This commit is contained in:
2026-02-15 14:57:17 +09:00
commit f25fd6f802
198 changed files with 10342 additions and 0 deletions

38
reproduce_issue.rb Normal file
View File

@@ -0,0 +1,38 @@
require_relative 'app/services/game_api_client'
require 'pp'
client = GameApiClient.new
# Get initial state
puts "Fetching initial state..."
initial_state_full = client.api_game_initial_state
if initial_state_full.nil?
puts "Failed to fetch initial state"
exit
end
game_state = initial_state_full["game_state"]
puts "Game state fetched. Game ID: #{game_state['game_id']}"
# Test possible orders
puts "\nTesting api_calculate_possible_orders(game_state)..."
begin
orders = client.api_calculate_possible_orders(game_state)
if orders
puts "Success! Number of locations with orders: #{orders['possible_orders']&.keys&.size}"
else
puts "Failed! Returned nil."
end
rescue ArgumentError => e
puts "Caught ArgumentError: #{e.message}"
rescue => e
puts "Caught unexpected error: #{e.class} - #{e.message}"
end
# Test with 2 arguments
puts "\nTesting api_calculate_possible_orders(game_state, 'FRANCE')..."
orders = client.api_calculate_possible_orders(game_state, 'FRANCE')
if orders
puts "Success! Power: #{orders['power']}"
else
puts "Failed! Returned nil."
end