ygopro-core + YGOpen to explore possible plays/events and outputs a graph of states and actions for visualization.flowchart LR
userBrowser[UserBrowser] --> frontendSPA[FrontendSPA]
frontendSPA -->|HTTP/JSON| apiServer[GoWebAPI]
apiServer -->|Go calls| graphBuilder[GraphBuilder]
graphBuilder -->|Go calls| engineWrapper[EngineWrapper]
engineWrapper -->|CGo calls| engineBridge[CppYGOpenCore]
engineBridge --> ygoproCore[ygopro-core]
engineBridge --> ygopenCodec[YGOpenCodec]
engineWrapper -->|protobuf Duel.Msg / Answer| graphBuilder
graphBuilder -->|Graph(nodes,edges)| apiServer
apiServer -->|Graph JSON| frontendSPA
ygopro-core and YGOpen in a small, stable C API that Go can call.YGOpen::Proto::Duel::Msg → serialized bytes.duelpb.Msg (generated from .proto).duelpb.Answer and sends serialized bytes back.Answer → raw responses to ygopro-core.ygo-visualizer/bridge/ocgapi.h / .dll (already present).ygopen/ (already present in your workspace).[ygo-visualizer]/bridge/ygopen_bridge.cpp[ygo-visualizer]/bridge/ygopen_bridge.h[ygo-visualizer]/engine/engine.go[ygo-visualizer]/ygopenpb/duel_msg.pb.go[ygopen]/include/ygopen/proto/duel_data.proto[ygopen]/include/ygopen/proto/duel_msg.proto[ygopen]/include/ygopen/proto/duel_answer.proto protoc \\
--go_out=./ygo-visualizer/ygopenpb --go_opt=paths=source_relative \\
ygopen/include/ygopen/proto/duel_data.proto \\
ygopen/include/ygopen/proto/duel_msg.proto \\
ygopen/include/ygopen/proto/duel_answer.proto
ygopenpb or duelpb, and import it from wrapper and graph layers.Design a minimal C API that Go will call (implemented in C++, compiled into a DLL that Go links against):