ページへ戻る

− Links

 印刷 

blike​/C​/p0013 の変更点 :: OSASK計画

osaskwiki:blike/C/p0013 の変更点

  
現: 2024-01-08 (月) 12:58:52 lina[3] ソース[4]
Line 1: Line 1:
 +TITLE:x
 +* スロットマシンゲーム [#s1e0e5db]
 +-(by [[K]], 2010.07.09)
 +*** (1) プログラム [#xf05e323]
 + #include "blike.h"
 + 
 + main()
 + {
 +     int a, b, c;
 +     cls();
 +     b = 0; c = 1;
 +     for (;;) {
 +         locate(2, 2); printf("%d %d\n", b, c);
 +         wait(10);
 +         a = inkey();
 +         if (a != 0) { break; }
 +         b++; c++;
 +         if (b > 9) { b = 0; }
 +         if (c > 9) { c = 0; }
 +     }
 +     for (;;) {
 +         locate(2, 2); printf("%d %d\n", b, c);
 +         wait(10);
 +         a = inkey();
 +         if (a != 0) { break; }
 +         c++;
 +         if (c > 9) { c = 0; }
 +     }
 +     if (b == c) { printf("あたり!\n"); } else { printf("はずれ\n"); }
 + }
 +*** (2) あそびかた [#r745089a]
 +-2桁しかない簡易スロットマシンゲームです。数字をそろえられたら勝ちです。
 +-適当にキーを押せば、数字を止められます。
  

  • blike/C/p0013 のバックアップ差分(No. All)
    • 現: 2024-01-08 (月) 12:58:52 lina[3]