Created
February 28, 2012 17:26
-
-
Save bforrest/1933826 to your computer and use it in GitHub Desktop.
Gravity Kata
This file contains hidden or 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