Christmas Challenge 2021


This was a nice challenge, and the picture above is the screenshot I submitted as part of my entry, which shows the code used, the drawing of the tree, and also the software and hardware used, plus the program length. I thought 80 bytes was good going.

It works by first calculating the width of the current screen, as centring the tree was part of the requirement, by backspacing one character with VDU from a clear screen, putting the current X text position at the right-most position, stored in BASIC pseudo-variable POS.

Next, we draw the tree which is encoded in T$ as one ASCII character for each row of the tree, deducting 64 from the value to get the number of stars on each row, and centring the row using the width we discovered earlier.



Click here to return to Christmas Challenge 2021