16
2
Introduction
For the ones who never heard of this game before. You are playing a ball which needs to survive as long as possible. This is done by moving to the left or right, going to the holes. Since the map moves upwards, you need to go downwards to survive longer. If you search for images, you probably know which game I mean.
The Task
Given a positive integer n, output a falling ball map of n layers. Between the layers, there are 4 newlines. The width of the layer is made up of 25 underscore characters, with one hole of length 5. That means that the total width is equal to 30. This is randomly shifted after each layer. An example of a valid layer is:
_______________ __________
The hole can also be at the edges, as if the layer is like a cylinder:
_________________________
Note that there are 2 leading spaces and 3 trailing spaces. Making a single hole of width 5.
Test cases
For n=4, this is a valid output:
_______________ __________
______ ___________________
_______________________ __
_________________________
Note: the holes must be uniformly distributed. Trailing and/or leading newlines are allowed.
This is code-golf, so the submission with the least amount of bytes wins!
1@DonMuesli Haha, that can happen to anyone :p – Adnan – 2016-03-17T19:25:01.377