,,,
.
.
.
:
.
.
-1-1 ,
.
:
.
1999
:
1. -.
2. -.
3.- -.
4. -.
5. -.
-
. , -
, ,
, .
. - ,
. . -
. , . , , -
.
-
.
.
-
. -
. -
.
, . , .
, .
, -
.
.
2. .
, - - . -
. , -
,
.
, , . , , , .
, -
.
2 . : -
, -
. 10% . 1/12 -
, .. 1 .
: -
60 , 40 .
15 . -
, ..
20 .
. -
, .. 60 , -
3 . -
, 20 , .
-
, 3-4 -
. 80% .
1/120 , 120 ; -
, -
10 .
. -
- , . , 30 . -
- . . , -
, .
, -
.
, -
, , -
-
. . , -
. , . , - , - -
.
, , -
. 3 : -
, , -
W , DW WS . W DW WS , . DW , - , -
, . WS
, , -
. , ,
W - .
.
-
1 20 M. -
D , , - . , : W >= 2M ,
D 1,5. W<2M , D=0,1.
, D -
, 1/12 . -
. , .
: / ( - ) 60 , 40* . / ,
15* . , D.
D , , .
-
. Ÿ . -
- -
,- - -
, . , -
, .
-
. -
-
. -
, . ,
.. . MNC.
, -
, , . - : M/C >60 DC=3C , 20 < M/C < 40 DC=3 4 , D=0. . >=120 /120 -
, .-
-
MN.
M > MN , D = D + /30 , DS = DS ( /30 ) * , DS -
, . <=MN , DC= DC + ( N )
DS=DS + PS * ( C MNC ) , .. MNC -
.
-
-
. -
, , -
, . -
. , -
-
.
, , -
. , , , . -
. , , -
, -
.
, :
BY ,
Y ,
F , ,
MT
BW ,
W - ,
H ,
DW ,
J ࠠ ,
DT
,
,
WS , ,
PW ,
MN ,
DM ,
,
MNC ,
,
DC
,
DS ,
S ,
ST , ,
I - ,
.
4. .
'IMITATION OF <WHEAT-MICE-CATS> ECOSYSTEM
DEFDBL G-H, S
CLS
INPUT " -"; by
INPUT " -"; f
INPUT " -"; bw
INPUT " -"; h
PRINT " ?"
IF bw < h THEN j = bw / 8 ELSE j = h / 12
PRINT "( "; INT(j); " )"
INPUT t
INPUT " $-"; pc
INPUT " "; mnc
INPUT " -"; mn
PRINT "( )."
PRINT "YEAR=,MONTH=,WHEAT=,MICE=,CATS=,DWHEAT=,DMICE=,DCATS="
st = 0: w = bw: m = INT(RND(1) * 20 + 1): y = 0: mt = 0: c = mnc
50 RANDOMIZE TIMER
mt = mt + 1
IF mt > 12 THEN s = 0 AND ws = 0
ds = 0
IF mt > 12 THEN y = y + 1
IF y > f THEN END
'
IF mt > 12 THEN PRINT "++++++++++++++++++++++++++++++++++++++++++++++++++++++"
IF mt > 12 THEN INPUT " 999 -"; i
IF i = 999 THEN GOTO 3000
IF mt > 12 THEN mt = 1
IF mt = 1 THEN INPUT " $-"; pw
'
dw = 0
IF mt = 8 THEN dw = dw + h ELSE dw = dw + 0
'
dm = 0
dm = dm - 1 * INT(m / 12)
' - .
dw = dw - 2 * INT(m)
IF w <= 0 THEN END
'
IF w > t THEN dt = t ELSE dt = w
dw = dw - dt
' ,
SELECT CASE INT(m)
CASE IS > 60 * c
dm = dm - 40 * c
CASE IS <= 60 * c
dm = dm - 15 * c
CASE 0
dm = dm + 0
END SELECT
' -
IF m <= w / 2 THEN dm = dm + INT(1.5 * m) ELSE dm = dm + INT(m / 10)
' -
m = m + dm
'
dc = 0
IF c > 120 THEN dc = dc - INT(c / 120) ELSE dc = dc - CINT(RND(1))
IF c < 0 THEN c = 0
'
SELECT CASE mt
CASE 3, 9
GOSUB 1000
END SELECT
'
IF m > mn THEN GOTO 80
60 dc = dc - c + mnc
70 ds = ds + pc * (c - mnc): GOTO 85
80 dc = dc + INT(m \ 30)
ds = ds - INT(m \ 30) * pc
85 s = s + ds
c = c + dc
'
IF INT(m) <= 0 THEN m = INT(RND(1) * 20 + 1)
'
w = w + dw
IF INT(w) < 0 THEN w = 0
IF INT(w) <= 0 THEN GOTO 3000
',
PRINT "y="; by + y; " ";
PRINT "mt="; mt; " ";
PRINT "w="; INT(w); " ";
PRINT "dw="; INT(dw); " ";
PRINT "m="; INT(m); " ";
PRINT "dm="; INT(dm); " ";
PRINT "c="; INT(c); " ";
PRINT "dc="; INT(dc); " ";
PRINT "ds="; ds
'
IF mt = 12 THEN GOSUB 2500
GOTO 50
'
1000 SELECT CASE INT(m)
CASE IS > 60 * c
dc = dc + 3 * c
CASE IS < 20
dc = dc + 0
CASE 0
dc = dc - .8 * c
CASE ELSE
dc = dc + INT(RND(1)) + 3
END SELECT
RETURN
'
2500 PRINT "*********************************************************"
'
PRINT " ="; INT(s); "$ "
' ר
INPUT " "; ws
'ר
dw = dw - ws
w = w + dw
ds = ws * pw
s = s + ds
st = st + s
'
PRINT " ="; pw * ws; "$ "
PRINT " ="; INT(s); "$"
PRINT " ="; INT(st); "$"
IF st < 0 THEN GOTO 3000
RETURN
3000 END
5. .
, , -
,
. 1999 . -
. , , -
BW , H T. , -
, , W
16000 , H 16 ,
2 ( .. = 2000 ).
,
250 20 ,
. , , , , .. RND RANDOMIZE . . , - , . , MNC=3 , = 27 , BW , H T . 5.
DM , .
DM = 0 , M = 27 . - DM = DM INT ( M/12 ) , .. DM = = 0 INT ( 27/12 ) = 0 2 = -2. DM = DM + INT ( 1.5*M ) = -2 + INT ( 40.5 ) = -2 + 40 =
= 38.
: DM = DM 15*C = 38 45 = - 7.
.
, -
-
.
. . . : .
Copyright (c) 2024 Stud-Baza.ru , , , .