
Untitled
By: a guest on
Jul 17th, 2012 | syntax:
None | size: 0.83 KB | hits: 11 | expires: Never
Gravity Kata
Create a system that shows how stacked ice blocks behave with gravity.
Here are some examples of how the ice blocks behave in this system:
Adding blocks
Before After
--->|X|
|X|
-----------------------------
Shifting blocks from left:
Before After
|X|
--->|X| |X||X|
--------------------------
Before After
|X||X||X| |X||X|
--->|X||X||X| |X||X||X||X|
-----------------------------
Before After
|X||X||X| |X||X|
--->|X||X||X| |X||X||X|
|X||X||X| |X||X||X||X|
-------------------------------
Before After
|X||X| |X||X|
--->|X||X||X| |X||X||X|
|X||X||X||X| |X||X||X||X|
-------------------------------