Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ascii Christmas Tree
#1
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 + ...
Reply


Messages In This Thread
Ascii Christmas Tree - by bplus - 11-21-2024, 05:15 PM
RE: Ascii Christmas Tree - by Pete - 11-21-2024, 09:03 PM
RE: Ascii Christmas Tree - by eoredson - 11-30-2024, 05:24 AM
RE: Ascii Christmas Tree - by Pete - 12-01-2024, 10:48 PM
RE: Ascii Christmas Tree - by SierraKen - 12-24-2024, 09:21 PM
RE: Ascii Christmas Tree - by fistfullofnails - 12-26-2024, 11:50 PM
RE: Ascii Christmas Tree - by Pete - 12-27-2024, 02:51 AM



Users browsing this thread: 1 Guest(s)