1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 """Este módulo es para guardar las constantes que se usan en el programa."""
22
23 import time
24
25
26
27
28 PLAYER_B = "player_b"
29 RANK_B = "20k"
30 PLAYER_W = "player_w"
31 RANK_W = "20k"
32 SIZE = 19
33
34
35
36
37 WITH_WEBCAM = 1
38 WITH_VIDEO = 2
39 BLACK = 0
40 WHITE = 1
41 SPACE = -1
42 TEXT_INTERSECTION = "Intersecciones encontradas. ¿Estan bien?(Y/N)"
43 NAME_FILE = "Inserte el nombre del archivo y pulse Intro: "
44 EJE_X = 0
45 EJE_Y = 1
46 KEY_NOT_DOWN = -1L
47 THRESHOLD = 0.7
48
49
50 fecha_actual = time.strftime("%d %b %Y")
51 tiempo = 1800
52
53 INITSGF = ( "(;FF[4]GM[1]SZ[%d]" %(SIZE),
54 "\nAP[Tablerogo]",
55 "\nPB[%s]" %PLAYER_B,
56 "\nBR[%s]" %RANK_B,
57 "\nHA[0]",
58 "\nPW[%s]" %PLAYER_W,
59 "\nWR[%s]" %RANK_W,
60 "\nKM[6.5]DT[%s]" %fecha_actual,
61 "\nTM[%d]" %tiempo,
62 "\nRU[Japanese]",
63 "\n("
64 )
65
66 """
67 CARACTERISTICAS DE LOS ARCHIVOS .SGF
68 ====================================
69
70 * AB: Add Black: locations of Black stones to be placed on the board prior to the first move.
71 * AW: Add White: locations of White stones to be placed on the board prior to the first move.
72 * AN: Annotations: name of the person commenting the game.
73 * AP: Application: application that was used to create the SGF file (e.g. CGOban2,...).
74 * B: a move by Black at the location specified by the property value.
75 * BR: Black Rank: rank of the Black player.
76 * BT: Black Team: name of the Black team.
77 * C: Comment: a comment.
78 * CP: Copyright: copyright information. See Kifu Copyright Discussion.
79 * DT: Date: date of the game.
80 * EV: Event: name of the event (e.g. 58th Honinbo Title Match).
81 * FF: File format: version of SGF specification governing this SGF file.
82 * GM: Game: type of game represented by this SGF file. A property value of 1 refers to Go.
83 * GN: Game Name: name of the game record.
84 * HA: Handicap: the number of handicap stones given to Black. Placment of the handicap stones are set using the AB property.
85 * KM: Komi: komi.
86 * ON: Opening: information about the opening (fuseki), rarely used in any file.
87 * OT: Overtime: overtime system.
88 * PB: Black Name: name of the black player.
89 * PC: Place: place where the game was played (e.g.: Tokyo).
90 * PL: Player: color of player to start.
91 * PW: White Name: name of the white player.
92 * RE: Result: result, usually in the format "B+R" (Black wins by resign) or "B+3.5" (black wins by 3.5 moku).
93 * RO: Round: round (e.g.: 5th game).
94 * RU: Rules: ruleset (e.g.: Japanese).
95 * SO: Source: source of the SGF file.
96 * SZ: Size: size of the board, non square boards are supported.
97 * TM: Time limit: time limit in seconds.
98 * US: User: name of the person who created the SGF file.
99 * W: a move by White at the location specified by the property value.
100 * WR: White Rank: rank of the White player.
101 * WT: White Team: name of the White team.
102
103 """
104