? xonix ? ... XoniX ... !!! XONIX !!!
qbasic qb64 xonix
gif 45 kB
https://en.wikipedia.org/wiki/Xonix
en.wikipedia.org/wiki/Xonix
Code: (Select All)
Randomize Timer: b = Int(Rnd*15+5): a = Int(Rnd*15+5): ' xonix.bas
y = Int(Rnd*(b-3)+3): x = Int(Rnd*(a-3)+3): d=Int(Rnd*4+1)
'y = 5: x = 5: b = 10: a = 20: d=1 ' xonix.bas
For i = 1 To a: Print "#";: Next: Print ' area
For j = 1 To b-2: Print "#";: For k = 1 To a-2: Print ".";: Next: Print "#": Next
For i = 1 To a: Print "#";: Next
For q = 1 To 1000: _Delay .03: Locate y, x: Print " "
If d=1 Then If (y-1 = 1) And (x+1 = a) Then d=3
If d=1 Then If (y-1 > 1) And (x+1 = a) Then d=4
If d=1 Then If (y-1 = 1) And (x+1 < a) Then d=2
If d=1 Then y = y-1: x = x+1
If d=2 Then If (y+1 = b) And (x+1 = a) Then d=4
If d=2 Then If (y+1 < b) And (x+1 = a) Then d=3
If d=2 Then If (y+1 = b) And (x+1 < a) Then d=1
If d=2 Then y = y+1: x = x+1
If d=3 Then If (y+1 = b) And (x-1 = 1) Then d=1
If d=3 Then If (y+1 < b) And (x-1 = 1) Then d=2
If d=3 Then If (y+1 = b) And (x-1 > 1) Then d=4
If d=3 Then y = y+1: x = x-1
If d=4 Then If (y-1 = 1) And (x-1 = 1) Then d=2
If d=4 Then If (y-1 > 1) And (x-1 = 1) Then d=1
If d=4 Then If (y-1 = 1) And (x-1 > 1) Then d=3
If d=4 Then y = y-1: x = x-1
Locate y, x: Print "@"
Next
qbasic qb64 xonix
gif 45 kB
https://en.wikipedia.org/wiki/Xonix
en.wikipedia.org/wiki/Xonix
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic
Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic
Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself