@@ -76,6 +76,7 @@ static int difficulty = 3;
76
76
static int eagerness = 2 ;
77
77
78
78
79
+ static void print_dedication ();
79
80
static void setup_preferences ();
80
81
static int get_option (char * message , char * values );
81
82
static void get_input ();
@@ -107,8 +108,11 @@ int main(int argc, char **argv) {
107
108
score_player = 0 ;
108
109
109
110
printf ("*******************\n" );
110
- printf ("* Piskworks %s *\n" , VERSION );
111
- printf ("*******************\n\n" );
111
+ printf ("* Piskvorky %s *\n" , VERSION );
112
+ printf ("*******************\n" );
113
+ printf ("(c)2016 berk\n\n" );
114
+ print_dedication ();
115
+
112
116
do {
113
117
setup_preferences ();
114
118
eagerness = ((rand () % 3 ) - 1 ) * 2 ;
@@ -137,36 +141,49 @@ int main(int argc, char **argv) {
137
141
138
142
} while (result == 0 );
139
143
140
- printf ("GAME OVER! \n" );
144
+ printf ("KONEC HRY \n" );
141
145
if (result == 1 ) {
142
146
score_computer ++ ;
143
- printf ("Computer is winner \n" );
147
+ printf ("Vyhral pocitac \n" );
144
148
} else {
145
149
score_player ++ ;
146
- printf ("You are winner\n" );
147
- }
148
- printf ("(d=%d, e=%d, %s started)\n" , difficulty , eagerness , (computer_starts_game ) ? "computer" : "you" );
150
+ printf ("Jsi vitez\n" );
151
+ }
149
152
150
- printf ("Computer:You %d:%d\n" , score_computer , score_player );
151
- c = get_option ("\nAnother game ? (y /n)" , "YyNn " );
152
- } while (tolower (c ) == 'y ' );
153
+ printf ("Pocitac:Ty %d:%d\n" , score_computer , score_player );
154
+ c = get_option ("\nHrat znovu ? (a /n)" , "AaNn " );
155
+ } while (tolower (c ) == 'a ' );
153
156
154
157
return 0 ;
155
158
}
156
159
160
+ void print_dedication () {
161
+ printf ("Toto vydani piskvorku je\n" );
162
+ printf ("venovano webu CS.SPECCY.CZ,\n" );
163
+ printf ("ktery sbira ceskoslovenske hry\n" );
164
+ printf ("pro zx81.\n\n" );
165
+
166
+ printf ("Pokud vite o nejake\n" );
167
+ printf ("ceskoslovenske hre pro zx81,\n" );
168
+ printf ("kontaktujte prosim autory webu.\n\n" );
169
+
170
+ printf ("Pokracujte libovolnou klavesou.\n\n" );
171
+ getchar ();
172
+ }
173
+
157
174
void setup_preferences () {
158
175
int c ;
159
176
160
- printf ("Preferences :\n\n" );
161
- printf ("* your stones ... %c\n" , toupper (cross_char ));
162
- printf ("* difficulty ... %d\n" , difficulty );
163
- printf ("* %s will put first move \n" , (computer_starts_game ) ? "computer " : "you " );
177
+ printf ("Nastaveni :\n\n" );
178
+ printf ("* tve kameny ... %c\n" , toupper (cross_char ));
179
+ printf ("* obtiznost ... %d\n" , difficulty );
180
+ printf ("* %s\n" , (computer_starts_game ) ? "pocitac zacina hru " : "ty zacinas hru " );
164
181
165
- c = get_option ("\n(C)hange preferences ,(S)tart" , "CcSs " );
182
+ c = get_option ("\n(Z)mena nastaveni ,(S)tart" , "ZzSs " );
166
183
167
- if (tolower (c ) == 'c ' ) {
184
+ if (tolower (c ) == 'z ' ) {
168
185
169
- c = get_option ("Do you want to play with X or O?" , "XxOo" );
186
+ c = get_option ("Chces hrat X nebo O?" , "XxOo" );
170
187
if (tolower (c ) == 'x' ) {
171
188
cross_char = 'x' ;
172
189
circle_char = 'o' ;
@@ -175,11 +192,11 @@ void setup_preferences() {
175
192
circle_char = 'x' ;
176
193
}
177
194
178
- c = get_option ("Which difficulty (1,2,3)?" , "123" );
195
+ c = get_option ("Zvol obtiznost (1,2,3)?" , "123" );
179
196
difficulty = c - '1' + 1 ;
180
197
181
- c = get_option ("Do you want to put first move (y /n)?" , "YyNn " );
182
- if (tolower (c ) == 'y ' ) {
198
+ c = get_option ("Chcs zacinat hru (a /n)?" , "AaNn " );
199
+ if (tolower (c ) == 'a ' ) {
183
200
computer_starts_game = 0 ;
184
201
} else {
185
202
computer_starts_game = 1 ;
@@ -210,7 +227,7 @@ void get_input() {
210
227
211
228
do {
212
229
is_input_correct = 0 ;
213
- printf ("Put your move . (for ex . B3)\n" );
230
+ printf ("Zadej svuj tah . (napr . B3)\n" );
214
231
fgets (line , LINELEN - 1 , stdin );
215
232
216
233
if (strlen (line ) < 2 )
@@ -226,7 +243,7 @@ void get_input() {
226
243
227
244
s = get_stone (gs .minx + (x - 'A' ), gs .miny + y - 1 );
228
245
if (s != EMPTY ) {
229
- printf ("This field is already occupied \n" );
246
+ printf ("Toto pole je uz obsazene \n" );
230
247
continue ;
231
248
}
232
249
@@ -580,7 +597,7 @@ void print_grid() {
580
597
int x , y ;
581
598
STONE stone ;
582
599
583
- printf ("\nMove %d\n\n" , move_cnt );
600
+ printf ("\nTah %d\n\n" , move_cnt );
584
601
printf (" " );
585
602
#ifndef SCCZ80
586
603
putchar (' ' );
0 commit comments