In the video game Minecraft, you can obtain beacons and put them on pyramid-like structures to give you special effects, such as speed or jump boost.
Your task is to, given an effect, construct the beacon pyramid required for it.
There are multiple sizes of beacon pyramids, required for different effects. The largest has a size 9
base, and the smallest has a size 3
base.
These are the effects you can get, and the required pyramid for them (as specified by the official Minecraft wiki:
3:
Speed I
Haste I
5:
Resistance I
Jump Boost I
7:
Strength I
9:
Regeneration I
Resistance II
Jump Boost II
Speed II
Haste II
Strength II
Beacons are constructed with the base at the bottom, then it goes up, decreasing the size by 2. Once we hit 1, there should be a beacon +
at the top.
A beacon is defined as a +
, but it needs a supporting pyramid to work.
You may assume the input is valid (ie, it is one of the effects specified here), and, optionally, you may assume the input is all lowercase. The #
character should be used in the pyramid, and +
as the beacon.
Examples:
Haste I
+
###
Resistance I
+
###
#####
Strength I
+
###
#####
#######
Regeneration I
+
###
#####
#######
#########
Speed II
+
###
#####
#######
#########
You must also take multiple effects as beacon pyramids can share blocks - however, one beacon cannot do more than one effect. You must use minimal blocks.
When taking multiple effects, you may use any reasonable input format such as a list, newline separated, etc. Additionally, you may take a singleton list for single beacons if you are using lists.
For these examples, I only list one possible solution, but there are multiple acceptable solutions.
Speed I, Haste II
++
####
#####
#######
#########
(another acceptable solution is the following,
these are both valid as they use the same amount of blocks)
+
###
#####
#######+
##########
(the following is not valid for the same input; it doesn't use minimal blocks)
+
###
##### +
####### ###
#########
Strength I, Strength I
++
####
######
########
(don't output things in brackets, if that isn't obvious enough)