Skip to content

Massinja/christmas_tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Welcome to My Christmas Tree


Task

Create a program which can be run in the terminal that displays a Christmas Tree.

Description

The program was built using C language

The challenges were to figure out right formulas that will let you build proportional trees of any size. While there is a pattern, it was not straightforward. There were a lot of disformed trees at the beginning:
Screen Shot 2022-05-26 at 7 02 30 AM Screen Shot 2022-05-26 at 6 49 00 AM

Installation

Run command "make" in the terminal. It will build the target file "my_tree"

make

Usage

To run the program type in "./my_tree" and the size of the tree.
If none or invalid size is given the program termminates.
The size is limited to 15 tiers to look nice in the terminal and avoid overflows.
(The tallest tree is 116 metres in Redwood National Park in California, USA. And we are not competing with it.)

./my_tree 3

Screen Shot 2023-03-25 at 9 11 00 AM

Discovering ANSI escape codes to show colours was a game changer!
The step up will be to add tree ornaments and some snow!

The Core Team

Made at Qwasar Silicon Valley Qwasar Silicon Valley Logo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published