Created
February 29, 2012 00:43
-
-
Save codereflection/1936597 to your computer and use it in GitHub Desktop.
Gravity Kata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| | |
------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment