Shrekaton, or How the hackathon is held in MobileUp

    image


    While most programmers participate in ordinary hackathons, the valiant droids from Mobailapia arrange the Shrekaton: they save the princess through programming and solving logic problems.


    On December 9, we decided to hold a hackathon in order to distract specialists a bit from routine work and motivate us to new exploits. It’s boring to take ready-made tasks or similar tasks, so I came up with my own plot. Now I want to share the details of the game and talk about how to mock the employees to organize a boring hackathon on their own.


    All MobileUp developers were divided into mixed teams of 2 people: iOS developers with Android developers, Android developers with R & D engineers, Backend developers with iOS developers, and so on. The first challenge was to decide which language to program in.


    At workplaces, I hid QR codes that opened up access to a fabulous legend whose characters have striking similarities with real employees of the company. And although the inscription read: “ all names and events are invented, coincidences are considered random ,” I nevertheless decided to introduce a small descriptor (or list of characters) for Habr’s readers:


    List of actors of Shrekatona


    Shrekozavr is the alter ego of our project manager Oleg Shirokov. He is engaged in capoeira and likes to evaluate jokes on a point system like: "This is a joke on a hundred."
    The Beat Princess Olyagushka is a character whose prototype was the marketing and PR manager, with a rare name Beata.
    Serge I Magnificent - it is easy to guess that we are talking about the CEO of MobileUp, which we usually call Serge.
    Cute cat - development director Viktor Chernogorov. He called himself that.
    Alyosha Popovich - iOS developer Alexei Nemychenkov.
    Very Troll - Vitaliy Zarubin iOS Team Lead with nickname Very Zloy. Known for his rare but caustic comments.
    Kos Tien- Android Team Lead Konstantin Tskhovrebov (@terrakok).
    Timon is a meerkat from the cartoon "The Lion King", or iOS developer Nikolai Timonin.
    Polindroid - iOS developer Polina Demidova. They say that she loves cookies very much and always carries them with her.
    Dark Lord is the author of this insanity, technical director of MobileUp, Evgeny Valeev.
    Pendalf White - as opposed to the dark Wife, we have a bright Zhenya Denisov, project manager.


    We will be familiar. So, let's start our story:


    “In a certain kingdom, in the twenty-first (according to Tagline) state of Mobailapia, grief happened - the evil Shrekozavr kidnapped the Beatic Princess Olyagushka and imprisoned her (not in the sense of eating) in his Parad-Dur castle. The king of Mobailapia, Serju I the Great, was upset, but he was not depressed and decided to act. And since the king is “Magnificent” and not “Brave,” he did not go to fight the Shrekosaurus himself, but announced a reward to the one who would save the princess.


    Many different iDazzled Droids responded - everyone wanted the kingdom and the floor of the princess as a reward. They also welcomed the legendary Russian hero Aylosha Popovich, the great Chinese droid Kos Tien, the famous Crimean Timon, and experienced wisdom Very Troll, and even the good old Vologda Polindroid. Only the glorious Pendalf White, who had been gray-haired, didn’t come - he had nothing to fight against unclean power, because in his arsenal there was only html knowledge with which he could defeat perhaps only small foot soldiers, and even then only sleeping.


    It is known that Shrekozavr is absolutely invincible by physical means, because he is engaged in martial arts Baida-Oreira. But he has absolutely no sense of humor, and there are rumors that if you make him laugh at 400 points (no one knows how much it is and how to measure it), he will burst from laughter and the princess will be saved.


    technical note:
    There is reliable information that says that you need to do this in two turns in a row. Otherwise, what’s going on will reach Shrekozavra, and he will gobble up the Petrosyan to hell with dogs. And the only salvation is to run away from him at the distance of one cell. Anyway, he is so fierce that he eats everyone in a row who stands close to him for longer than two moves (i.e., towards the end of the second move). Points of laughter accumulate during two moves from all players. The winner is the one whose joke contribution was the first to exceed 400 points.

    All players from birth have approximately the same mass (~ 50) and sense of humor (~ 100), which can be pumped by collecting different nishtyaks from the field:


    • Mushroom - causes acute attacks of oligofrendiya, gives +20 to the mass and -30 to the sense of humor.
    • Kicker - gives +25 to the mass and +25 to the sense of humor.
    • Cookie - Adds +15 to the mass.
    • Beat bra - the princess helps to play the Shrekozavra, +50 to humor, but only in jokes to the Shrekozavr.
    • A cute cat is an absolutely useless creature, but beautiful and cute, and pulls him to take with him, but keep in mind - he will instantly annihilate all your mass and completely zero out your sense of humor. When moving to the cage in which the cat sits, he himself jumps into his hands. If there is an object in the hand, then it drops out.

    technical note:
    There are rumors that the cat prefers the left hand, and there is also a non-zero probability that the cat will not jump into its arms.

    • Shrekosaurus panties - do not give anything and do not take anything. But once seeing them, it is impossible to forget :)
    • Eye of Serveron - it cannot be taken and carried away. But being on the same cell with him, the ability to see the whole field appears.
    • Dark Lord - like any Dark matter, it is absolutely unpredictable. Taking it with you, you can both get an increase in mass and humor, and even lose them. But you will not know this until you try.

    technical note: It was
    experimentally established that mass has an inverse proportion to humor - the more the creature has mass, the more difficult it is to make it laugh. But it is not exactly.

    Since the villain is very fierce, to increase the likelihood of the princess being freed, all iO brilliant droids are paired.


    technical note:
    All idroids must run on different devices - i.e. have different IP addresses, even if they are in the same team.

    On each cell there is a fence on which you can write (while in this cell), anything (the only restriction is that the word should consist of three lettersno more than 10 characters), and this message can be read by everyone who is within a radius of three (ie a 5x5 square) cells from it [ A little tediousness: the inscription on the fence erases the previous message from this fence ].


    Some more tediousness:


    • the size of the field is not known in advance;
    • at the very beginning, players are placed on the field randomly, but the players of the same team are within sight of each other;
    • Each turn, the player receives the current state of the playing field within a radius of three cells, i.e. 5x5 square;
    • in one move, the player can move to one free cell in any direction, including diagonal ones, write on the fence and do one of the following: take / drop an object or tell a joke to an opponent / Shrekozavr in an adjacent cell;
    • if the opponent likes the joke, he laughs for so long that he skips the next move;
    • a cell, another player, or part of the Shrekozavra castle can be located on a cell (in general, it occupies more than one cell and has an arbitrary shape) - then it is impossible to move to this cell;
    • since each droid has only two hands and not a single pocket, you can take no more than two niches at a time.

    technical note:
    If you send a command containing more actions than it should be in one move, only the first ones that are in the limit will be executed. The rest will be ignored.

    I congratulate all those who have read this document to the end on the adventures! Go to accomplishments! ”


    On this happy note, the legend ends and the API begins. He is freely available. Who cares, you can watch it here .


    How it went (a small photo report)


    image
    The key to the legend.


    image
    Our developers have never been so close (I mean, they usually don’t sit in pairs). Fighting the Shrekosaurus under the supervision of His Darkness.


    image
    Someone seems to have found the Shrekosaurus Panties ...


    image
    And here is the Shrekozavr himself :-)


    image
    Shrekaton was successful, the princess is saved.


    Game progress


    The game lasted about 5 hours.
    The teams used the following languages ​​to create bots:


    • Java
    • Objective-c
    • Python
    • Javascript

    The winner was iObrilliant droid Ilyich Filinovich.



    Also popular now: