… | |
… | |
17 | Marker types for each board position (ORed together): |
17 | Marker types for each board position (ORed together): |
18 | |
18 | |
19 | MARK_TRIANGLE # triangle mark |
19 | MARK_TRIANGLE # triangle mark |
20 | MARK_SQUARE # square mark |
20 | MARK_SQUARE # square mark |
21 | MARK_CIRCLE # circle mark |
21 | MARK_CIRCLE # circle mark |
|
|
22 | MARK_CROSS # cross mark |
22 | MARK_SMALL_B # small stone, used for scoring or marking |
23 | MARK_SMALL_B # small stone, used for scoring or marking |
23 | MARK_SMALL_W # small stone, used for scoring or marking |
24 | MARK_SMALL_W # small stone, used for scoring or marking |
24 | MARK_B # normal black stone |
25 | MARK_B # normal black stone |
25 | MARK_W # normal whit stone |
26 | MARK_W # normal whit stone |
26 | MARK_GRAYED # in conjunction with MARK_[BW], grays the stone |
27 | MARK_GRAYED # in conjunction with MARK_[BW], grays the stone |
… | |
… | |
71 | sub MARK_GRAYED (){ 0x0080 } # in conjunction with MARK_[BW], grays the stone |
72 | sub MARK_GRAYED (){ 0x0080 } # in conjunction with MARK_[BW], grays the stone |
72 | sub MARK_LABEL (){ 0x0100 } |
73 | sub MARK_LABEL (){ 0x0100 } |
73 | sub MARK_HOSHI (){ 0x0200 } # this is a hoshi point (not used much) |
74 | sub MARK_HOSHI (){ 0x0200 } # this is a hoshi point (not used much) |
74 | sub MARK_MOVE (){ 0x0400 } # this is a regular move |
75 | sub MARK_MOVE (){ 0x0400 } # this is a regular move |
75 | sub MARK_KO (){ 0x0800 } # this is a ko position |
76 | sub MARK_KO (){ 0x0800 } # this is a ko position |
|
|
77 | sub MARK_CIRCLE (){ 0x1000 } |
76 | sub MARK_REDRAW (){ 0x8000 } |
78 | sub MARK_REDRAW (){ 0x8000 } |
77 | |
79 | |
78 | sub COLOUR_BLACK (){ 0 } |
80 | sub COLOUR_BLACK (){ 0 } |
79 | sub COLOUR_WHITE (){ 1 } |
81 | sub COLOUR_WHITE (){ 1 } |
80 | |
82 | |
… | |
… | |
200 | 13 => [3, 6, 9], |
202 | 13 => [3, 6, 9], |
201 | 19 => [3, 9, 15], |
203 | 19 => [3, 9, 15], |
202 | ); |
204 | ); |
203 | our %HANDICAP_XY = ( |
205 | our %HANDICAP_XY = ( |
204 | 2 => [qw(0,2 2,0 )], |
206 | 2 => [qw(0,2 2,0 )], |
205 | 3 => [qw(0,2 2,0 2,2 )], |
207 | 3 => [qw(0,2 2,0 0,0 )], |
206 | 4 => [qw(0,2 2,0 2,2 0,0 )], |
208 | 4 => [qw(0,2 2,0 0,0 2,2 )], |
207 | 5 => [qw(0,2 2,0 2,2 0,0 1,1)], |
209 | 5 => [qw(0,2 2,0 0,0 2,2 1,1)], |
208 | 6 => [qw(0,2 2,0 2,2 0,0 0,1 2,1 )], |
210 | 6 => [qw(0,2 2,0 0,0 2,2 0,1 2,1 )], |
209 | 7 => [qw(0,2 2,0 2,2 0,0 0,1 2,1 1,1)], |
211 | 7 => [qw(0,2 2,0 0,0 2,2 0,1 2,1 1,1)], |
210 | 8 => [qw(0,2 2,0 2,2 0,0 0,1 2,1 1,0 1,2 )], |
212 | 8 => [qw(0,2 2,0 0,0 2,2 0,1 2,1 1,0 1,2 )], |
211 | 9 => [qw(0,2 2,0 2,2 0,0 0,1 2,1 1,0 1,2 1,1)], |
213 | 9 => [qw(0,2 2,0 0,0 2,2 0,1 2,1 1,0 1,2 1,1)], |
212 | ); |
214 | ); |
213 | |
215 | |
214 | sub update { |
216 | sub update { |
215 | my ($self, $path) = @_; |
217 | my ($self, $path) = @_; |
216 | |
218 | |