Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASCII_xmas trees
#1
Some randomly decorated ascii xmas trees.

Code: (Select All)
'ascii X_mas trees
_Title "ASCII X_mas Trees"
Randomize Timer
Do
    tmid = 40
    Color 14, 0
    Locate 3, tmid
    Print "X"
    treetri tmid, 3, 5
    treetri tmid, 6, 7
    treetri tmid, 11, 8
    Color 6, 0
    Locate 20, tmid: Print "#"
    Locate 21, tmid: Print "#"
    Color 15, 0


    tmid = 20
    Color 14, 0
    Locate 6, tmid: Print "x"
    treetri tmid, 6, 4
    treetri tmid, 8, 6
    treetri tmid, 11, 8
    Color 6, 0
    Locate 20, tmid: Print "#"
    Locate 21, tmid: Print "#"
    Color 15, 0

    tmid = 60
    Color 14, 0
    Locate 6, tmid: Print "x"
    treetri tmid, 6, 4
    treetri tmid, 8, 6
    treetri tmid, 11, 8
    Color 6, 0
    Locate 20, tmid: Print "#"
    Locate 21, tmid: Print "#"
    Color 15, 0
    Do
        _Limit 30
        kk$ = InKey$
    Loop Until kk$ <> ""
Loop Until kk$ = Chr$(27)

Sub treetri (tx, ty, th)
    For y = 1 To th
        For x = tx - y + 1 To tx + y - 1
            Color 2, 0
            Locate y + ty, x: Print "*"
            Select Case Int(Rnd * 12)
                Case 1
                    Color 4, 0
                    Locate y + ty, x: Print "O"
                Case 2
                    Color 14, 0
                    Locate y + ty, x: Print "o"

            End Select
        Next x
    Next y
End Sub
Reply


Messages In This Thread
ASCII_xmas trees - by James D Jarvis - 12-16-2022, 04:08 AM
RE: ASCII_xmas trees - by CharlieJV - 12-16-2022, 04:44 AM
RE: ASCII_xmas trees - by CharlieJV - 12-16-2022, 04:59 AM
RE: ASCII_xmas trees - by James D Jarvis - 12-16-2022, 01:55 PM
RE: ASCII_xmas trees - by Pete - 12-16-2022, 05:48 AM



Users browsing this thread: 1 Guest(s)