|
1: 2010-07-09 (金) 02:02:24 k-tan |
| + | TITLE:x |
| + | * 数字早押しゲーム [#f6e10709] |
| + | -(by [[K]], 2010.07.09) |
| + | *** (1) プログラム [#of68f3a6] |
| + | #include "blike.h" |
| | | |
| + | main() |
| + | { |
| + | int a, b, c, d, e, f; |
| + | cls(); e = 0; f = 200; |
| + | a = rnd(10); b = rnd(79); c = 0; |
| + | for (;;) { |
| + | locate(b, c); printf("%d", a); |
| + | locate(0, 0); printf("点数 = %d 速さ = %f ", e, f); |
| + | if (c == 23) { break; } |
| + | wait(200); |
| + | locate(b, c); printf(" "); |
| + | d = inkey(0); |
| + | if (d == a + 48) { |
| + | e += 23 - c; |
| + | /* また別の数字を落とす */ |
| + | a = ransu(10); b = ransu(79); c = 0; |
| + | f--; |
| + | if (f < 10) { f = 10; } |
| + | } else { |
| + | c++; |
| + | if (d != 0) { e -= 23 - c; } |
| + | if (e < 0) { e = 0; } |
| + | } |
| + | } |
| + | } |
| + | |
| + | *** (2) 遊び方 [#g36a2be2] |
| + | -画面上部から落ちてくる数字を、できるだけ早く入力してください。速ければ速いほど点数が多くもらえます。 |