[
   {
      "id":"challenge-8UCUaNvC",
      "name":"Shoot me",
      "level":1,
      "description":"Let's get started. It should be a piece of cake. Your enemy is in front of you, the gun is pointed at it. All you need to do is to pull the trigger and fire! \n\n![preview](./img/challenge01.png)\n\nNo idea where to start? Read [the docs](./docs/manual/ai_script.html).",
      "rngSeed":0.98287429583523,
      "timeLimit":30000,
      "completed":false,
      "aiDefList":[
         {
            "source":"file",
            "name":"dummy"
         }
      ],
      "modifier":{
         "player":[
            {
               "x":-150,
               "y":0,
               "a":0
            }
         ],
         "dummy":[
            {
               "x":150,
               "y":0,
               "a":180
            }
         ]
      }
   },
   {
      "id":"challenge-Du7tyrCB",
      "name":"Look at me",
      "level":2,
      "description":"You know how to shoot, right? Now it's time to move a little bit. Your enemy is located on the southern-east. Point your gun at that direction, then... you know what to do next :) Notice that your tank is slightly rotated what needs to be taken into account during aiming. \n\n![preview](./img/challenge02.png) \n\nNeed more help? You'll find it in [the docs](./docs/algorithms/aiming.html).",
      "rngSeed":0.2590328450293485,
      "timeLimit":30000,
      "completed":false,
      "aiDefList":[
         {
            "source":"file",
            "name":"dummy"
         }
      ],
      "modifier":{
         "player":[
            {
               "x":-100,
               "y":-100,
               "a":223
            },
            {
               "x":-100,
               "y":-100,
               "a":337
            },
            {
               "x":-100,
               "y":-100,
               "a":194
            },
            {
               "x":-100,
               "y":-100,
               "a":310
            },
            {
               "x":-100,
               "y":-100,
               "a":209
            },
            {
               "x":-100,
               "y":-100,
               "a":230
            },
            {
               "x":-100,
               "y":-100,
               "a":310
            },
            {
               "x":-100,
               "y":-100,
               "a":254
            },
            {
               "x":-100,
               "y":-100,
               "a":212
            },
            {
               "x":-100,
               "y":-100,
               "a":208
            },
            {
               "x":-100,
               "y":-100,
               "a":179
            },
            {
               "x":-100,
               "y":-100,
               "a":359
            }
         ],
         "dummy":[
            {
               "x":100,
               "y":100,
               "a":45
            }
         ]
      }
   },
   {
      "id":"challenge-4syTf6ph",
      "name":"Scan me",
      "level":3,
      "description":"There is usually no targets at predefined positions in the battlefield. In this case, your enemy will be located at a random spot somewhere nearby. Your job is to use the radar attached to your tank, locate the enemy and eliminate it. \n\n![preview](./img/challenge03.png) \n\nAs always, more guidelines in [the docs](./docs/algorithms/aiming.html).",
      "rngSeed":0.4309845234095827,
      "timeLimit":30000,
      "completed":false,
      "aiDefList":[
         {
            "source":"file",
            "name":"dummy"
         }
      ],
      "modifier":{
         "player":[
            {
               "x":0,
               "y":0,
               "a":-93
            },
            {
               "x":0,
               "y":0,
               "a":-152
            },
            {
               "x":0,
               "y":0,
               "a":-128
            },
            {
               "x":0,
               "y":0,
               "a":-144
            },
            {
               "x":0,
               "y":0,
               "a":-43
            },
            {
               "x":0,
               "y":0,
               "a":152
            },
            {
               "x":0,
               "y":0,
               "a":-95
            },
            {
               "x":0,
               "y":0,
               "a":142
            },
            {
               "x":0,
               "y":0,
               "a":-10
            },
            {
               "x":0,
               "y":0,
               "a":70
            }
         ],
         "dummy":[
            {
               "x":141,
               "y":-142,
               "a":495
            },
            {
               "x":124,
               "y":-157,
               "a":488
            },
            {
               "x":-78,
               "y":-184,
               "a":427
            },
            {
               "x":95,
               "y":-176,
               "a":478
            },
            {
               "x":-185,
               "y":-76,
               "a":382
            },
            {
               "x":153,
               "y":-129,
               "a":500
            },
            {
               "x":12,
               "y":-200,
               "a":454
            },
            {
               "x":-66,
               "y":189,
               "a":289
            },
            {
               "x":146,
               "y":-137,
               "a":497
            },
            {
               "x":-198,
               "y":28,
               "a":352
            }
         ]
      }
   },
   {
      "id":"challenge-hXMwLdZw",
      "name":"Predict me",
      "level":4,
      "description":"Things get complicated - your target is moving back and forth. Since it takes some time for the bullet to travel the distance and hit it, you need to consider that and predict your enemy's future position before shooting. \n\n![preview](./img/challenge04.png) \n\nMore guidelines in [the docs](./docs/algorithms/aiming.html).",
      "rngSeed":0.7113695353800222,
      "timeLimit":30000,
      "completed":false,
      "aiDefList":[
         {
            "source":"code",
            "name":"Mover",
            "code":"importScripts(\"lib/tank.js\");var direction=0.8,isTurning=!1;tank.init(function(i,a){i.SKIN=\"forest\"}),tank.loop(function(i,a){let n=null===i.radar.wallDistance||i.radar.wallDistance>120,t=direction>0?0:180,r=Math.deg.normalize(t-i.radar.angle);a.RADAR_TURN=r;let e=Math.abs(r)>1;e||n||(e=!0,direction*=-1),a.THROTTLE=!e&&n?direction:0});"
         }
      ],
      "modifier":{
         "player":[
            {
               "x":0,
               "y":0,
               "a":-24
            },
            {
               "x":0,
               "y":0,
               "a":104
            },
            {
               "x":0,
               "y":0,
               "a":-48
            },
            {
               "x":0,
               "y":0,
               "a":-72
            },
            {
               "x":0,
               "y":0,
               "a":-16
            },
            {
               "x":0,
               "y":0,
               "a":-66
            },
            {
               "x":0,
               "y":0,
               "a":53
            },
            {
               "x":0,
               "y":0,
               "a":85
            },
            {
               "x":0,
               "y":0,
               "a":-135
            },
            {
               "x":0,
               "y":0,
               "a":-154
            }
         ],
         "mover":[
            {
               "x":140,
               "y":0,
               "a":-115
            }
         ]
      }
   },
   {
      "id":"challenge-tV3fKHBw",
      "name":"Chase me",
      "level":5,
      "description":"Your opponent drives around trying to run away from you. Can you catch it? \n\n![preview](./img/challenge05.png) \n\nIf you need the manual, it is available [here](./docs/manual/README.html)",
      "rngSeed":0.38835849114718024,
      "timeLimit":30000,
      "completed":false,
      "aiDefList":[
         {
            "source":"file",
            "name":"crawler"
         }
      ],
      "modifier":{
         "player":[
            {
               "x":-350,
               "y":0,
               "a":124
            },
            {
               "x":-350,
               "y":0,
               "a":-126
            },
            {
               "x":-350,
               "y":0,
               "a":127
            },
            {
               "x":-350,
               "y":0,
               "a":-29
            },
            {
               "x":-350,
               "y":0,
               "a":-108
            },
            {
               "x":-350,
               "y":0,
               "a":82
            },
            {
               "x":-350,
               "y":0,
               "a":11
            },
            {
               "x":-350,
               "y":0,
               "a":-42
            },
            {
               "x":-350,
               "y":0,
               "a":-132
            },
            {
               "x":-350,
               "y":0,
               "a":167
            }
         ],
         "crawler":[
            {
               "x":-100,
               "y":0,
               "a":0
            }
         ]
      }
   },
   {
      "id":"challenge-6iZxC1FP",
      "name":"Find me",
      "level":6,
      "description":"Time for some exploration of the battlefield. The opponent is not difficult - you just need to find it. Remember that the radar has limited range so you need to move around the battlefield a little bit. \n\n![preview](./img/challenge06.png) \n\nIf you need the manual, it is available [here](./docs/manual/README.html)",
      "rngSeed":0.18940819134692158,
      "timeLimit":60000,
      "completed":false,
      "aiDefList":[
         {
            "source":"code",
            "name":"Snake",
            "code":"importScripts(\"lib/tank.js\");let isActive=!1,timer=0,turnTime=0,prevEnergy=100,turnDirection=1;tank.init(function(i,t){i.SKIN=\"forest\"}),tank.loop(function(i,t){i.energy<prevEnergy&&(isActive=!0),prevEnergy=i.energy,(i.collisions.wall||i.collisions.enemy||i.collisions.ally)&&(turnTime=Math.round(100*Math.random()+50),turnDirection=Math.random()<.5?1:-1,isActive=!1),turnTime>0?(t.THROTTLE=0,t.BOOST=0,t.TURN=turnDirection,turnTime--):isActive&&0==turnTime?(t.THROTTLE=1,t.BOOST=1,t.TURN=2*Math.cos(timer),timer+=.1):(t.THROTTLE=0,t.BOOST=0,t.TURN=0)});"
         }
      ],
      "modifier":{
         "player":[
            {
               "x":-350,
               "y":-200,
               "a":0
            }
         ],
         "snake":[
            {
               "x":-91,
               "y":200,
               "a":0
            },
            {
               "x":-342,
               "y":200,
               "a":0
            },
            {
               "x":132,
               "y":200,
               "a":180
            },
            {
               "x":309,
               "y":200,
               "a":180
            },
            {
               "x":218,
               "y":200,
               "a":180
            },
            {
               "x":113,
               "y":200,
               "a":180
            },
            {
               "x":32,
               "y":200,
               "a":180
            },
            {
               "x":21,
               "y":200,
               "a":180
            },
            {
               "x":232,
               "y":200,
               "a":180
            },
            {
               "x":336,
               "y":200,
               "a":180
            }
         ]
      }
   }
]
