Build Tower

Ruby

Build Tower by the following given argument: number of floors (integer and always greater than 0).

Tower block is represented as *

For example, a tower of 3 floors looks like below

[
  '  *  ', 
  ' *** ', 
  '*****'
]

and a tower of 6 floors looks like below

[
  '     *     ', 
  '    ***    ', 
  '   *****   ', 
  '  *******  ', 
  ' ********* ', 
  '***********'
]

Create a method called build_tower that accepts a an integer of floors.

def tower_builder(n_floors) end
< >