Because of this, families from all over the world are building Christmas trees.
But this normal tree can get boring after a while, so let's make an ASCII tree!
Leafs are represented by #
and must be arranged as shown in the example output. We have 5 balls (O
) and 5 candy canes (J
), which we place randomly around the tree. We also have a candle on top.
Input: none
Output:
^
|
###
##O##
#######
#####
####J##
#########
####O######
#############
###J###
#########
####O###J##
#######O#####
###J########O##
###########J#####
###
###
Rules (if it's not in the rules, assume you can)
Balls and candy canes must be randomly placed on the tree and must have at least one leaf between them, not counting diagonals.
Each leaf must have a non-zero chance of getting a ball or a candy cane.
There may be leading or trailing spaces on each line, as long as the tree has the proper shape.
This is code-golf, so shortest code in characters wins.