@@ -108,9 +108,9 @@ export const store = new Vuex.Store({
108
108
initialized : false ,
109
109
active : false ,
110
110
PvE : false ,
111
- PvEParam : 'go btime 5000 ' ,
111
+ PvEParam : 'go movetime 1000 ' ,
112
112
PvEValue : 'time' ,
113
- PvEInput : 5000 ,
113
+ PvEInput : 1000 ,
114
114
turn : true ,
115
115
fen : 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1' ,
116
116
lastFen : 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1' , // to track the end of the current line
@@ -612,7 +612,6 @@ export const store = new Vuex.Store({
612
612
goEnginePvE ( context ) {
613
613
engine . send ( context . getters . PvEParam )
614
614
context . commit ( 'setEngineClock' )
615
- context . commit ( 'active' , true )
616
615
} ,
617
616
setActiveTrue ( context ) {
618
617
context . commit ( 'active' , true )
@@ -628,7 +627,12 @@ export const store = new Vuex.Store({
628
627
} ,
629
628
PvEfalse ( context ) {
630
629
context . commit ( 'PvE' , false )
631
- context . dispatch ( 'stopEngine' )
630
+ if ( ! context . getters . turn ) {
631
+ context . dispatch ( 'stopEngine' )
632
+ } else {
633
+ context . commit ( 'resetEngineTime' )
634
+ context . commit ( 'active' , false )
635
+ }
632
636
context . dispatch ( 'resetEngineData' )
633
637
} ,
634
638
stopEngine ( context ) {
@@ -643,7 +647,6 @@ export const store = new Vuex.Store({
643
647
context . dispatch ( 'position' )
644
648
context . dispatch ( 'goEngine' )
645
649
} else if ( context . getters . active && context . getters . PvE && ! context . getters . turn ) {
646
- context . dispatch ( 'stopEngine' )
647
650
context . dispatch ( 'position' )
648
651
context . dispatch ( 'goEnginePvE' )
649
652
}
0 commit comments