rubiks-cube-mcp-server
Version:
MCP server for Rubik's Cube solving with real-time 3D visualization and MCP UI integration
27 lines (24 loc) • 654 B
JavaScript
// 큐브 조작 컨트롤
function sendMove(move) {
if (!gameId) {
alert('No active game session');
return;
}
// 시각적 회전 효과
if (cubeRenderer) {
cubeRenderer.setRotating(true);
setTimeout(() => {
cubeRenderer.setRotating(false);
}, 500);
}
// 서버로 move 전송 (HTTP API 사용)
fetch(`/api/cube/${gameId}/move`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ move }),
}).catch(error => {
console.error('Failed to send move:', error);
});
}