Commit 7495764e authored by Chunchi Che's avatar Chunchi Che

add move service

parent d8cfe6a5
...@@ -7,6 +7,7 @@ import onMsgNewPhase from "./newPhase"; ...@@ -7,6 +7,7 @@ import onMsgNewPhase from "./newPhase";
import onMsgHint from "./hint"; import onMsgHint from "./hint";
import onMsgSelectIdleCmd from "./selectIdleCmd"; import onMsgSelectIdleCmd from "./selectIdleCmd";
import onMsgSelectPlace from "./selectPlace"; import onMsgSelectPlace from "./selectPlace";
import onMsgMove from "./move";
export default function handleGameMsg(pb: ygopro.YgoStocMsg) { export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
const dispatch = store.dispatch; const dispatch = store.dispatch;
...@@ -62,6 +63,13 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) { ...@@ -62,6 +63,13 @@ export default function handleGameMsg(pb: ygopro.YgoStocMsg) {
break; break;
} }
case "move": {
const move = msg.move;
onMsgMove(move, dispatch);
break;
}
default: { default: {
break; break;
} }
......
import { ygopro } from "../../api/ocgcore/idl/ocgcore";
import MsgMove = ygopro.StocGameMessage.MsgMove;
import { AppDispatch } from "../../store";
export default (move: MsgMove, dispatch: AppDispatch) => {
console.log(move);
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment