- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 100
Private Sub Command2_Click()
Cls
For x = 1 To Text2 + 1
For y = 1 To Text2 + 1
A(x, y) = Round(Rnd(1))
If A(x, y) = 0 Then A(x, y) = -1
Next
Next
For x = 2 To Text2
For y = 2 To Text2
PSet (1200 + x * 15, 200 + y * 15), A(x, y)
Next
Next
End Sub
Private Sub Command3_Click()
Cls
For x = 1 To Text2 + 1
For y = 1 To Text2 + 1
A(x, y) = 1
Next
Next
A(Text20, Text21) = -1
A(Text22, Text23) = -1
A(Text24, Text25) = -1
A(Text26, Text27) = -1
For x = 2 To Text2
For y = 2 To Text2
PSet (1200 + x * 15, 200 + y * 15), A(x, y)
Next
Next
End Sub
Private Sub Form_Load()
For x = 1 To Text2 + 1
For y = 1 To Text2 + 1
A(x, y) = Round(Rnd(1))
If A(x, y) = 0 Then A(x, y) = -1
Next
Next
'For x = 1 To Text2 + 1
'For y = 1 To Text2 + 1
'A(x, y) = 1
'Next
'Next
'A(10, 10) = -1
End Sub
Private Sub Command1_Click()
Cls
For k = 1 To Text1
For x = 1 To Text2 + 1
A(x, 1) = A(x, Text2)
A(x, Text2 + 1) = A(x, 2)
Next
For y = 1 To Text2 + 1
A(1, y) = A(Text2, y)
A(Text2 + 1, y) = A(2, y)
Next
For x = 2 To Text2
For y = 2 To Text2
xp = A(x - 1, y - 1) + A(x, y - 1) + A(x + 1, y - 1) + A(x - 1, y) + A(x + 1, y) + A(x - 1, y + 1) + A(x, y + 1) + A(x + 1, y + 1)
Select Case xp
Case -8
B(x, y) = Text3
Case -7
B(x, y) = Text4
Case -6
B(x, y) = Text5
Case -5
B(x, y) = Text6
Case -4
B(x, y) = Text7
Case -3
B(x, y) = Text8
Case -2
B(x, y) = Text9
Case -1
B(x, y) = Text10
Case 0
B(x, y) = Text11
Case 1
B(x, y) = Text12
Case 2
B(x, y) = Text13
Case 3
Жестокий, безумный мозг пятнадцатилетнего пацана родил клеточный автомат. Нашел свои исходники десятилетней давности.
А ведь я себя тогда считал крутым программистом... стыдно вспоминать.