###Statement You are given a still of a series of balls falling in a 2D grid. This grid is surrounded by immutable and unbreakable walls so all the action is contained within them. Your task is to determine what the state of the scenario will be after gravity does all it's work.
Statement
###Elements insideYou are given a still of a series of balls falling in a 2D grid. This grid is surrounded by immutable and unbreakable walls so all the action is contained within them. Your task is to determine what the state of the scenario will be after gravity does all it's work.
Elements inside grid
###Rules
Rules
Input
###Input
TheThe grid will be given in a string variable with whatever name is shortest in your language of choice. By default we will use a
as the input.
A sample of an input, exactly as received:
Output
###Output TheThe same grid, printed to screen with the final result of ball power. A valid answer would be one (1) of the following puzzles, each one corresponds to the input at the same position, of course if the input is different you should adjust the output. Not limit it to those four!
Score
###Score LanguagesLanguages will compete against themselves so feel free to use nongolf languages. To validate a solution I must be able to test it somewhere to see it works!.
###Warnings
Warnings
###Clarifying examples of ball movement
Clarifying examples of ball movement
How can I test if my answer is valid?
#UPDATES
###How can I test if my answer is valid?
I'veI've set up a simple page in one of my sites that will give you a random puzzle, and its answer. Take the input and check it against the output. My solution, without worrying too much about golfing is 389b
355b
in python (generator, and page also python)
###Leaderboard