Falling Rocks console game

Implement the "Falling Rocks" game in the text console. 
A small dwarf stays at the bottom of the screen and can move left and right (by the arrows keys).
A number of rocks of different sizes and forms constantly fall down and you need to avoid a crash.