Commit 1b638174 authored by Chunchi Che's avatar Chunchi Che

add selectUnselectInfo in matStore

parent 9adf71b6
Pipeline #26994 passed with stages
in 10 minutes and 48 seconds
......@@ -83,6 +83,11 @@ const initialState: Omit<MatState, "reset"> = {
},
},
tossResult: undefined,
selectUnselectInfo: {
processing: false,
finishable: false,
cancelable: false,
},
chainSetting: ChainSetting.CHAIN_SMART,
duelEnd: false,
// methods
......@@ -101,6 +106,7 @@ class MatStore implements MatState, NeosStore {
unimplemented = initialState.unimplemented;
handResults = initialState.handResults;
tossResult = initialState.tossResult;
selectUnselectInfo = initialState.selectUnselectInfo;
duelEnd = initialState.duelEnd;
// methods
isMe = initialState.isMe;
......@@ -122,6 +128,12 @@ class MatStore implements MatState, NeosStore {
this.unimplemented = 0;
this.handResults.me = 0;
this.handResults.op = 0;
this.tossResult = undefined;
this.selectUnselectInfo = {
processing: false,
finishable: false,
cancelable: false,
};
this.duelEnd = false;
}
}
......
......@@ -34,6 +34,12 @@ export interface MatState {
tossResult?: string; // 骰子/硬币结果
selectUnselectInfo: {
processing: boolean;
finishable: boolean;
cancelable: boolean;
};
handResults: BothSide<HandResult> & {
set: (controller: number, result: HandResult) => void;
}; // 猜拳结果
......
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