Rev 1538 | Rev 1590 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1538 | Rev 1584 | ||
---|---|---|---|
Line 230... | Line 230... | ||
230 | 230 | ||
231 | snprintf(key_msg, sizeof key_msg, |
231 | snprintf(key_msg, sizeof key_msg, |
232 | "%s - left %s - rotate %s - right %s - drop %s - pause %s - quit", |
232 | "%s - left %s - rotate %s - right %s - drop %s - pause %s - quit", |
233 | key_write[0], key_write[1], key_write[2], key_write[3], |
233 | key_write[0], key_write[1], key_write[2], key_write[3], |
234 | key_write[4], key_write[5]); |
234 | key_write[4], key_write[5]); |
235 | 235 | newgame: |
|
236 | scr_init(); |
236 | scr_init(); |
237 | setup_board(); |
237 | setup_board(); |
238 | 238 | ||
239 | srandomdev(); |
239 | srandomdev(); |
240 | scr_set(); |
240 | scr_set(); |
Line 349... | Line 349... | ||
349 | /* (int)(score * level * PRE_PENALTY)); */ |
349 | /* (int)(score * level * PRE_PENALTY)); */ |
350 | /* score = score * PRE_PENALTY; */ |
350 | /* score = score * PRE_PENALTY; */ |
351 | } |
351 | } |
352 | savescore(level); |
352 | savescore(level); |
353 | 353 | ||
- | 354 | showscores(level); |
|
- | 355 | ||
354 | printf("\nHit RETURN to see high scores, ^C to skip.\n"); |
356 | printf("\nHit 's' to new game, 'q' to quit.\n"); |
355 | 357 | ||
- | 358 | ||
- | 359 | while (i = getchar()) { |
|
- | 360 | if (i == 's') |
|
- | 361 | goto newgame; |
|
- | 362 | if (i == 'q') |
|
- | 363 | break; |
|
- | 364 | } |
|
- | 365 | ||
- | 366 | scr_clear(); |
|
- | 367 | printf("\n\n\n\t\tGame over.\n"); |
|
- | 368 | /* |
|
356 | while ((i = getchar()) != '\n') |
369 | while ((i = getchar()) != '\n') |
357 | if (i == EOF) |
370 | if (i == EOF) |
358 | break; |
371 | break |
359 | - | ||
360 | showscores(level); |
- | |
361 | 372 | */ |
|
362 | exit(0); |
373 | exit(0); |
363 | } |
374 | } |
364 | 375 | ||
365 | /* void */ |
376 | /* void */ |
366 | /* onintr(int signo) */ |
377 | /* onintr(int signo) */ |