11-21-2024, 05:15 PM
inspired by @fistfullofnails questions
Code: (Select All)
_Title "Ascii Christmas Tree" ' b+ 2024-11-21
xc = 40 ' screen center x column
' draw tree trunk
Color , 6
For i = 23 To 24
Locate i, xc: Print " ";
Next
Color , 2 ' color in tree
For i = 1 To 20
Locate i + 2, xc - Int(i / 2) ' rows 3 to 22
For j = 1 To i
Print " ";
Next
Next
' light up and twinkle
Do
i = Int(Rnd * 20) + 1
k = Int(Rnd * i) + 1
If Rnd < .25 Then
Color Int(Rnd * 16)
Locate i + 2, xc - Int(i / 2) + k - 1: Print "*";
Else
Color , 2
Locate i + 2, xc - Int(i / 2) + k - 1: Print " ";
End If
_Limit 60
Loop
b = b + ...