35
3
Word's A▲ and ᴀ▼ buttons change the font size according to these rules:
- The starting font size is 11.
- If ᴀ▼ is pressed when the font size is 1, the size stays 1.
- The font size changes with 1 point in the range 1 – 12.
- The font size changes with 2 points in the range 12 – 28.
- The choices are 28, 36, 48, 72, and 80 in the range 28 – 80.
- The font size changes with 10 points in the range 80 – 1630.
- The font size changes with 8 points in the range 1630 – 1638.
- If A▲ is pressed when the font size is 1638, the size stays 1638.
Task
In as few bytes as possible, determine the resulting font size when given a set of button presses in any reasonable format.
Examples
[3,-1,2]
, meaning A▲A▲A▲ᴀ▼A▲A▲: The result is 18.
Some possible formats are '^^^v^^'
, [1 1 1 -1 1 1]
, [True,True,True,False,True,True]
, ["+","+","+","-","+","+"]
, "‘‘‘’‘‘"
, "⛄️⛄️⛄️⛄️⛄️"
, 111011
, "CaB"
, etc...
[2]
: 14
[-1]
:10
[13]
:80
[-11,1]
: 2
[11,-1]
: 36
[170,-1]
: 1630
[2000,-2,100]
: 1638
3Do we have to take the set of button presses in that exact format? For example, would some or all of these be fine as well:
"^vvv^v^^^v"
,[-1, 1, 1, -1, 1, -1]
,[0, 1, 0, 1, 1, 0, 1]
? – orlp – 2017-01-04T13:31:31.283@orlp Yes. Originally I wrote them in, but I found the formats silly. I'll put them in right now. – Adám – 2017-01-04T13:37:11.933
2How about "" or "⛄️⛄️⛄️⛄️⛄️" – Nick T – 2017-01-05T16:02:37.530
4@NickT That's fine. – Adám – 2017-01-05T16:29:44.783