Skip to main content
Notice removed Reward existing answer by Razetime
Bounty Ended with user197974's answer chosen by Razetime
Commonmark migration
Source Link

###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

Leaderboard

###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.

###Elements inside grid

###Rules

###Input The 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 The 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 Languages 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

###Clarifying examples of ball movement

#UPDATES ###How can I test if my answer is valid? I'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

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.

Elements inside grid

Rules

Input

The 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

The 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

Languages 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

Clarifying examples of ball movement

How can I test if my answer is valid?

I'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

###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 inis contained within them. Your task is to determine what will the state of the scenario will be after gravity does all it's work.

  • Balls fall.
  • Floors, and slides don't fall.
  • If the ball hits a slide that would make it go through a wall (\#or#/), or cross through a floor the slide will act as a floor.
  • When a ball hits another ball the will become one ball, but increase their power to the sum of both balls.
  • New balls (joined) will continue to behave as usual.
  • When a ball can't move anymore, it's replaced by its power.
  • The power of a ball will always be at most 9.

###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 in contained within them. Your task is to determine what will the state of the scenario be after gravity does all it's work.

  • Balls fall.
  • Floors, and slides don't fall.
  • If the ball hits a slide that would make it go through a wall (\#or#/), or cross through a floor the slide will act as a floor.
  • When a ball hits another ball the will become one ball, but increase their power to the sum of both balls.
  • New balls (joined) will continue to behave as usual.
  • When a ball can't move anymore, it's replaced by its power.
  • The power of a ball will always be at most 9.

###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.

  • Balls fall.
  • Floors and slides don't fall.
  • If the ball hits a slide that would make it go through a wall (\#or#/), or cross through a floor the slide will act as a floor.
  • When a ball hits another ball the will become one ball, but increase their power to the sum of both balls.
  • New balls (joined) will continue to behave as usual.
  • When a ball can't move anymore, it's replaced by its power.
  • The power of a ball will always be at most 9.
Notice added Reward existing answer by Razetime
Bounty Started worth 500 reputation by Razetime
Added clarification from comments.
Source Link
lirtosiast
  • 21.5k
  • 5
  • 52
  • 127
  • Balls fall.
  • Floors, and slides don't fall.
  • If the ball hits a slide that would make it go through a wall (\#or#/), or cross through a floor the slide will act as a floor.
  • When a ball hits another ball the will become one ball, but increase their power to the sum of both balls.
  • New balls (joined) will continue to behave as usual.
  • When a ball can't move anymore, it's replaced by its power.
  • If theThe power is over 10, use the remainder or power/10 insteadof a ball will always be at most 9.
  • Balls fall.
  • Floors, and slides don't fall.
  • If the ball hits a slide that would make it go through a wall (\#or#/), or cross through a floor the slide will act as a floor.
  • When a ball hits another ball the will become one ball, but increase their power to the sum of both balls.
  • New balls (joined) will continue to behave as usual.
  • When a ball can't move anymore, it's replaced by its power.
  • If the power is over 10, use the remainder or power/10 instead.
  • Balls fall.
  • Floors, and slides don't fall.
  • If the ball hits a slide that would make it go through a wall (\#or#/), or cross through a floor the slide will act as a floor.
  • When a ball hits another ball the will become one ball, but increase their power to the sum of both balls.
  • New balls (joined) will continue to behave as usual.
  • When a ball can't move anymore, it's replaced by its power.
  • The power of a ball will always be at most 9.
fixed grammar
Link
nicael
  • 4.8k
  • 24
  • 43
Loading
added 3863 characters in body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
added 24 characters in body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
added 102 characters in body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
added 309 characters in body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
Tweeted twitter.com/StackCodeGolf/status/667514704072450048
edited body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
Added examples of ball movement
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
tags, and reword tie breaker, because king of the hill means something else in this community
Source Link
Martin Ender
  • 197.2k
  • 67
  • 447
  • 975
Loading
added 17 characters in body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
added 94 characters in body
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading
Source Link
Juan Cortés
  • 1.5k
  • 11
  • 20
Loading