last edited Apr 08 2017 by Phil Gardner | Created by Phil Gardner | Other contributors:
Program for a Raspberry Pi or Ubuntu PC that calls a "snow" function using different symbols, colours and weights to make simple screen-candy.
Produces and erases coloured patterns all over your terminal window/screen.
Running from IDE e.g. Geany starts from blank window.
Running from command-line blots out any work you had previously been doing(!)
If you have a Raspberry Pi, you already have the compiler to make the executable. You can load the multi-snow.cpp file into the Geany editor, then click on Build. Once built successfully, you can click on Execute.
If you are using Ubuntu, if you do not have the compiler, you can install it with…
sudo apt-get install build-essential
To compile from command line using compiler:
…then run the executable with:
Deluxe compilation instructions, for an executable with a more descriptive name:
g++ -o snow multi-snow.cpp
“What’s it got in its pocketsess?” Constants, integer and string data-types, random numbers (not seeded in this case), % (modulo remainder), while loop, switch-case selection statement, functions and calls, escape-sequences for old-school terminal screens to send cursor to any x,y position in window. No fishes… curses!
By downloading this resource you agree to the CAS resource guidelines and use it appropriately.
Note: Unless otherwise specified, this resource and all associated files are published here under the Creative Commons Attribution-Share Alike 3.0 Licence. If you wish to use a different license, please state this here.