Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASCII cube
#2
Code: (Select All)
Randomize Timer ' KUBIK.bas
'........T=====T 1
'......./-----/| 2
'....../-----/|| 2
'...../-----/||| 2
'..../-----/|||J 3
'.../-----/|||/ 4
'../-----/|||/ 4
'./-----/|||/ 4
'T=====T|||/ 4
'|*****|||/ 4
'|*****||/ 4
'|*****|/ 4
'L=====J 5
a = Int(Rnd*13)+3: b = Int(Rnd*7)+3: c = Int(Rnd*13)+3
Locate 1, 1: For i = 1 To c: Print ".";: Next
Print "T";: For i = 1 To a-2: Print "=";: Next: Print "T 1"

For i = 1 To b-2:
    For j = 1 To a+c-2: Print ".";: Next: Print "|| 2"
Next

For i = 1 To a+c-2: Print ".";: Next: Print "|J 3"

For i = 1 To c-1: Locate i+1, 1
    For j = c-i To 1 Step -1: Print ".";: Next: Print "/";
    For k = 1 To a-2: Print "-";: Next: Print "/"

    For m = 1 To b-2
        For n = 1 To c+a-1-i: Print "|";: Next: Print
    Next: _Delay .5

    For p = 1 To a+c-1-i: Print "|";: Next: Print "/ 4"
Next

Locate i+1, 1: Print "T";:
For i = 1 To a-2: Print "=";: Next: Print "T"
For i = 1 To b-2: Print "|";
    For j = 1 To a-2: Print "*";: Next: Print "|"
Next

Print "L";: For i = 1 To a-2: Print "=";: Next: Print "J 5"

who will simplify without locate?

UPDATE: c = Int(Rnd*13)+3


.bas   main.bas (Size: 1.19 KB / Downloads: 44)

Vizual Run https://qbjs.org/?mode=auto&src=https://...p?aid=2387


.bas   Kube11.bas (Size: 1.31 KB / Downloads: 48) bplus 2023-11-05

Vizual Run https://qbjs.org/?mode=auto&src=https://...p?aid=2390
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
Reply


Messages In This Thread
ASCII cube - by DANILIN - 11-05-2023, 06:29 AM
RE: ASCII cube - by DANILIN - 11-05-2023, 04:05 PM
RE: ASCII cube - by bplus - 11-05-2023, 08:03 PM
RE: ASCII cube - by bplus - 11-06-2023, 07:37 PM
RE: ASCII cube - by mnrvovrfc - 11-06-2023, 11:19 PM
RE: ASCII cube - by bplus - 11-07-2023, 12:49 AM
RE: ASCII cube - by bplus - 11-07-2023, 01:06 AM



Users browsing this thread: 2 Guest(s)