[topic] 自由意志をプログラムする

自由意志をプログラムしたプログラムを作ってください。

自由とは何でしょう?
意志とは何でしょう?

三つの四角の内、自由意志を持った四角はあるでしょうか?
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    WinSizeX = 600 : WinSizeY = 480
    screen 0, WinSizeX, WinSizeY, 0, (ginfo_dispx - WinSizeX) / 2, (ginfo_dispy - WinSizeY) / 2
    title "" : font "", 40 : randomize

    #const NUM 3
    #const SIZEX 100
    #const SIZEY 100

    dim Number, NUM : GoNum = 0
    dim PosX, NUM : dim PosY, NUM
    PosXIdx = (ginfo_winx - SIZEX * (NUM * 2 - 1)) / 2


*main

    //数値を決める

        NowSec = gettime(6)

        if NowSec ! PreSec {    //1秒毎の処理

            if GoNum = 0 : Number(GoNum) = Number(1) * 2
            if GoNum = 1 : Number(GoNum) = rnd(100)
            if GoNum = 2 : Number(GoNum) = rnd(10) * 10

            GoNum ++ : if GoNum = NUM : GoNum = 0

        }

        PreSec = gettime(6)


    //描画

        redraw 0

        color 255, 0, 128
        repeat NUM
            _cnt = cnt * 2
            PosX(cnt) = _cnt * SIZEX + PosXIdx : PosY(cnt) = (ginfo_winy - SIZEY) / 2
            boxf PosX(cnt), PosY(cnt), PosX(cnt) + SIZEX, PosY(cnt) + SIZEY
        loop

        color 255, 255, 128
        repeat NUM
            pos PosX(cnt) + 30, PosY(cnt) + 30 : mes Number(cnt)
        loop

        redraw 1


    await : goto *main

Posted feedbacks

Number of comments:0 Nested Flatten
  1. 1 HSP

Index

Feed

Other

Link

Pathtraq

loading...