Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
66abedf9
Commit
66abedf9
authored
May 28, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove block state in matStore
parent
3092b26a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
54 deletions
+1
-54
src/infra/index.ts
src/infra/index.ts
+1
-1
src/service/duel/start.ts
src/service/duel/start.ts
+0
-34
src/stores/matStore/store.ts
src/stores/matStore/store.ts
+0
-1
src/stores/matStore/types.ts
src/stores/matStore/types.ts
+0
-18
No files found.
src/infra/index.ts
View file @
66abedf9
// Some implementation of infrastructure
/* eslint import/export: 0 */
export
*
from
"
./console
"
;
export
*
from
"
./eventbus
"
;
export
*
from
"
./sleep
"
;
export
*
from
"
./stream
"
;
export
*
from
"
./console
"
;
src/service/duel/start.ts
View file @
66abedf9
...
...
@@ -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
(
...
...
src/stores/matStore/store.ts
View file @
66abedf9
...
...
@@ -62,7 +62,6 @@ const hint: MatState["hint"] = proxy({
*/
export
const
matStore
:
MatState
=
proxy
<
MatState
>
({
chains
:
[],
blocks
:
[],
timeLimits
:
{
// 时间限制
...
...
src/stores/matStore/types.ts
View file @
66abedf9
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment