… | |
… | |
13 | Please supply a description ) |
13 | Please supply a description ) |
14 | |
14 | |
15 | =head2 EXPORTED CONSTANTS |
15 | =head2 EXPORTED CONSTANTS |
16 | |
16 | |
17 | Marker types for each board position (ORed together): |
17 | Marker types for each board position (ORed together): |
|
|
18 | |
|
|
19 | MARK_B # normal black stone |
|
|
20 | MARK_W # normal whit stone |
|
|
21 | MARK_GRAYED # in conjunction with MARK_[BW], grays the stone |
|
|
22 | |
|
|
23 | MARK_SMALL_B # small stone, used for scoring or marking |
|
|
24 | MARK_SMALL_W # small stone, used for scoring or marking |
|
|
25 | MARK_SMALL_GRAYED # in conjunction with MARK_SMALL_[BW], grays the stone |
18 | |
26 | |
19 | MARK_TRIANGLE # triangle mark |
27 | MARK_TRIANGLE # triangle mark |
20 | MARK_SQUARE # square mark |
28 | MARK_SQUARE # square mark |
21 | MARK_CIRCLE # circle mark |
29 | MARK_CIRCLE # circle mark |
22 | MARK_CROSS # cross mark |
30 | MARK_CROSS # cross mark |
23 | MARK_SMALL_B # small stone, used for scoring or marking |
31 | |
24 | MARK_SMALL_W # small stone, used for scoring or marking |
|
|
25 | MARK_B # normal black stone |
|
|
26 | MARK_W # normal whit stone |
|
|
27 | MARK_GRAYED # in conjunction with MARK_[BW], grays the stone |
|
|
28 | MARK_SMALL_GRAYED # in conjunction with MARK_SMALL_[BW], grays the stone |
|
|
29 | MARK_LABEL # a text label |
32 | MARK_LABEL # a text label |
30 | MARK_HOSHI # this is a hoshi point (not used much) |
33 | MARK_HOSHI # this is a hoshi point (not used much) |
31 | MARK_MOVE # this is a regular move |
34 | MARK_MOVE # this is a regular move |
32 | MARK_KO # this is a ko position |
35 | MARK_KO # this is a ko position |
33 | MARK_REDRAW # ignored, can be used for your own purposes |
36 | MARK_REDRAW # ignored, can be used for your own purposes |
34 | |
37 | |
35 | COLOUR_WHITE # guarenteed to be 0 |
38 | COLOUR_WHITE # guaranteed to be 0 |
36 | COLOUR_BLACK # guarenteed to be 1 |
39 | COLOUR_BLACK # guaranteed to be 1 |
37 | |
40 | |
38 | MOVE_HANDICAP # used as "x-coordinate" for handicap moves |
41 | MOVE_HANDICAP # used as "x-coordinate" for handicap moves |
39 | MOVE_PASS # can be used as "x-coordinate" for pass moves |
42 | MOVE_PASS # can be used as "x-coordinate" for pass moves |
40 | |
43 | |
41 | =head2 METHODS |
44 | =head2 METHODS |
… | |
… | |
64 | # marker types for each board position (ORed together) |
67 | # marker types for each board position (ORed together) |
65 | |
68 | |
66 | sub MARK_TRIANGLE (){ 0x0001 } |
69 | sub MARK_TRIANGLE (){ 0x0001 } |
67 | sub MARK_SQUARE (){ 0x0002 } |
70 | sub MARK_SQUARE (){ 0x0002 } |
68 | sub MARK_CIRCLE (){ 0x0004 } |
71 | sub MARK_CIRCLE (){ 0x0004 } |
|
|
72 | sub MARK_CROSS (){ 0x0008 } |
|
|
73 | |
69 | sub MARK_SMALL_B (){ 0x0008 } # small stone, used for scoring or marking |
74 | sub MARK_SMALL_B (){ 0x0010 } # small stone, used for scoring or marking |
70 | sub MARK_SMALL_W (){ 0x0010 } # small stone, used for scoring or marking |
75 | sub MARK_SMALL_W (){ 0x0020 } # small stone, used for scoring or marking |
|
|
76 | sub MARK_SMALL_GRAYED (){ 0x0040 } |
|
|
77 | |
71 | sub MARK_B (){ 0x0020 } # normal black stone |
78 | sub MARK_B (){ 0x0080 } # normal black stone |
72 | sub MARK_W (){ 0x0040 } # normal whit stone |
79 | sub MARK_W (){ 0x0100 } # normal whit stone |
73 | sub MARK_GRAYED (){ 0x0080 } # in conjunction with MARK_[BW], grays the stone |
80 | sub MARK_GRAYED (){ 0x0200 } # in conjunction with MARK_[BW], grays the stone |
74 | sub MARK_SMALL_GRAYED (){ 0x0100 } |
81 | |
75 | sub MARK_LABEL (){ 0x0200 } |
82 | sub MARK_LABEL (){ 0x0400 } |
76 | sub MARK_HOSHI (){ 0x0400 } # this is a hoshi point (not used much) |
83 | sub MARK_HOSHI (){ 0x0800 } # this is a hoshi point (not used much) |
77 | sub MARK_MOVE (){ 0x0800 } # this is a regular move |
84 | sub MARK_MOVE (){ 0x1000 } # this is a regular move |
78 | sub MARK_KO (){ 0x1000 } # this is a ko position |
85 | sub MARK_KO (){ 0x2000 } # this is a ko position |
79 | sub MARK_CROSS (){ 0x2000 } |
|
|
80 | sub MARK_REDRAW (){ 0x8000 } |
86 | sub MARK_REDRAW (){ 0x8000 } |
81 | |
87 | |
82 | sub COLOUR_WHITE (){ 0 } |
88 | sub COLOUR_WHITE (){ 0 } |
83 | sub COLOUR_BLACK (){ 1 } |
89 | sub COLOUR_BLACK (){ 1 } |
84 | |
90 | |