Skip to content

YvesZHI/FallingCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2048d55 · Feb 17, 2023

History

61 Commits
Nov 15, 2016
Jan 13, 2020
Nov 18, 2016
Nov 22, 2016
Nov 20, 2016
Nov 15, 2016
May 10, 2019
Feb 17, 2023
No commit message
Nov 30, 2016
Sep 9, 2017
Sep 30, 2020
Nov 15, 2016
Nov 24, 2016
Nov 22, 2016
No commit message
Nov 25, 2016
Jan 11, 2018

Repository files navigation

FallingCode

Introduction

Simulation of the scene of falling code on the terminal. It is generated by pure character, instead of drawing.

alt text

Dependent library

ncurses
You need to install it by yourself. If you want to use another library, just edit SysTool.cpp and makefile.

Installation

Download and execute make.

Execution

Go to the directory bin and execute one of the commands as below:

  • ./matrix.out [colorValue]. E.g. ./matrix.out 23.
  • ./matrix.out <string> [colorValue]. E.g. ./matrix.out "hello world!" 122.
    Besides, the colorValue is optional and its range is [0, 255].

Attention

Some pts-tpye remote terminal may not work as expected, the reason is that the coordinate of terminal is transformed by the pts-type remote terminal. Use local terminal in this case.

Additional...

I'd like to execute ./matrix.out because the color by default is green.

There is an issue left: I want to set a tail (with a different color) for each column, whose length is 0.3 * lengthOfColumn, but it would be a very heavy calculation (read the comment in the file Column.h) as it's about double - multiplication.
My PC is a Mac Pro with 4GB RAM and its performance is not good enough so I commented the tail part. If you have another way to add the tail without any heavy calculation, it would be appreciated if you let me know.

##hope u enjoy this ##