Here, with this input, you must output \$829\$, because :
![icy tower play online icy tower play online](https://mmostats.com/images/games/tower-unite/screenshot-tower-unite-01.jpg)
This input end on floor 54 meaning he went off-screen just after that, without getting to another floor, so there's the game over ( this was not the case in the video since he went to the floor 232, so the array accurately representing the sequence would end with 232 at the end ) For example, the start to the video linked previously in the post will look like : įor the first floors. The input will be a "list" of integers ( or STDIN input ) which represents the sequence of floor jumped on. Since you need at least 2 multi-floor jumps to make a combo, the number of total floor jumped is higher than 4 The input In this challenge, since we consider that jumping to the same floor is waiting 3 seconds, the rules to make a valid combo is "You must jump to another floor" Said in another way : The combo must be followed by a jump to another floor or by waiting about 3 seconds. If you go off-screen, the combo is invalid and won't included in the score. The combo MUST NOT end with going off-screen.You jump to the floor \$F+x\$ where \$(x = 2\$.See that you always jump to \$x >= 2\$, jumps to lower floors with floors skipped between are not considered valid
![icy tower play online icy tower play online](https://api.web.gamepix.com/assets/img/600/340/banner/high-tower.png)
To be considered as a multi-floor jump, you need to skip at least 1 floor, meaning you need to get to the floor \$F+x\$ where \$x >= 2\$ A combo is a sequence of multi-floors jump. Sometimes, you will the to the floor \$F+1\$īut sometimes, if you go fast enough ( faster = higher jumps ), you will do a multi-floor jump, and skip some floors between. You have to jump from floors to floors to go as high as possible.
![icy tower play online icy tower play online](https://mobimg.b-cdn.net/file_exchange/java_game_images/games/3/2601/real/2.jpg)
The formula is simple : \$Score = 10 * LastFloor + Sum(ValidComboList.TotalFloorJumped^2)\$ What is a valid combo ? Your task is to write a program/function/whatever that calculates the score based on a input. If you get off-screen ( fell or camera was too fast for you to keep up ), it's game over, and then you get a score. The game concept is simple : you play as Harold the Homeboy, and your goal is to jump from floors to floors to go as high as possible without falling and getting off-screen ( the camera goes higher following you or at a speed that gets faster over time, and does not go down ). Do you know Icy Tower ? Here is a gameplay example of what i'm talking about