Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Question

Commonmark migration
Source Link

###Introduction

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

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

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 , so the submission with the least amount of bytes wins!

###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 , so the submission with the least amount of bytes wins!

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 , so the submission with the least amount of bytes wins!

added 1 character in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248

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

This is , so the submission with the least amount of bytes wins!

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

This is , so the submission with the least amount of bytes wins!

###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 , so the submission with the least amount of bytes wins!

Tweeted twitter.com/StackCodeGolf/status/710542143312564225
deleted 2 characters in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248

###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. A trailingTrailing and/or leading newlines is allowed.

This is , so the submission with the least amount of bytes wins!

###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. A trailing and/or leading newlines is allowed.

This is , so the submission with the least amount of bytes wins!

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

This is , so the submission with the least amount of bytes wins!

added 48 characters in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248
Loading
added 1 character in body
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248
Loading
Source Link
Adnan
  • 44.7k
  • 6
  • 83
  • 248
Loading

AltStyle によって変換されたページ (->オリジナル) /