File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -19,25 +19,25 @@ import (
1919const (
2020 AVG_MOVES_PER_GAME = 55
2121 MIN_MOVES_REMAINING = 15
22- MAX_TIME = time .Duration (8 ) * time .Hour // default search time limit
23- SAFETY_MARGIN = time .Duration (500 ) * time .Millisecond // minimal amount of time to keep on clock
22+ MAX_TIME = time .Duration (8 ) * time .Hour // default search time limit
23+ SAFETY_MARGIN = time .Duration (5 ) * time .Millisecond // minimal amount of time to keep on clock
2424)
2525
2626type GameTimer struct {
27- inc [2 ]time.Duration
28- remaining [2 ]time.Duration
27+ inc [2 ]time.Duration
28+ remaining [2 ]time.Duration
2929 movesRemaining int
3030 startTime time.Time
31- timer * time.Timer
32- s * Search
33- sideToMove uint8
31+ timer * time.Timer
32+ s * Search
33+ sideToMove uint8
3434}
3535
3636func NewGameTimer (movesPlayed int , sideToMove uint8 ) * GameTimer {
3737 return & GameTimer {
3838 movesRemaining : max (MIN_MOVES_REMAINING , AVG_MOVES_PER_GAME - movesPlayed ),
39- remaining : [2 ]time.Duration {MAX_TIME , MAX_TIME },
40- sideToMove : sideToMove ,
39+ remaining : [2 ]time.Duration {MAX_TIME , MAX_TIME },
40+ sideToMove : sideToMove ,
4141 startTime : time .Now (),
4242 }
4343}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
1515 "github.com/pkg/profile"
1616)
1717
18- var version = "0.2.1 "
18+ var version = "0.2.2 "
1919
2020func max (a , b int ) int {
2121 if a > b {
You can’t perform that action at this time.
0 commit comments