Commit 66abedf9 authored by Chunchi Che's avatar Chunchi Che

remove block state in matStore

parent 3092b26a
// Some implementation of infrastructure
/* eslint import/export: 0 */
export * from "./console";
export * from "./eventbus";
export * from "./sleep";
export * from "./stream";
export * from "./console";
......@@ -34,40 +34,6 @@ export default (start: ygopro.StocGameMessage.MsgStart) => {
extraSize: start.extraSize2,
});
for (let sequence = 0; sequence < MZONE_SIZE; sequence++) {
matStore.blocks.push({
location: {
zone: ygopro.CardZone.MZONE,
controller: 0,
sequence,
},
});
matStore.blocks.push({
location: {
zone: ygopro.CardZone.MZONE,
controller: 1,
sequence,
},
});
}
for (let sequence = 0; sequence < SZONE_SIZE; sequence++) {
matStore.blocks.push({
location: {
zone: ygopro.CardZone.SZONE,
controller: 0,
sequence,
},
});
matStore.blocks.push({
location: {
zone: ygopro.CardZone.SZONE,
controller: 1,
sequence,
},
});
}
// 再初始化`cardStore`
const cards = flatten(
......
......@@ -62,7 +62,6 @@ const hint: MatState["hint"] = proxy({
*/
export const matStore: MatState = proxy<MatState>({
chains: [],
blocks: [],
timeLimits: {
// 时间限制
......
......@@ -16,8 +16,6 @@ export interface MatState {
set: (controller: number, obj: Partial<InitInfo>) => void;
}; // 双方的初始化信息
blocks: BlockState[]; // 场上`Block`信息,比如怪兽区,墓地等
chains: ygopro.CardLocation[]; // 连锁的卡片位置
timeLimits: BothSide<number> & {
......@@ -40,22 +38,6 @@ export interface MatState {
isMe: (player: number) => boolean;
}
export interface BlockState {
// `Block`的位置
location: {
controller: number;
zone: ygopro.CardZone;
sequence: number;
};
// 位置选择信息,如果当前`Block`可以被选择作为
// 怪兽召唤/发动魔陷的位置时,该字段会被设置
selectInfo?: Interactivity<{
controler: number;
zone: ygopro.CardZone;
sequence: number;
}>;
}
export interface InitInfo {
masterRule?: string;
name: string;
......
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