ironheartbj18

testing with www.codingame.com

May 13th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. /**
  2. * CodinGame planet is being attacked by slimy insectoid aliens.
  3. **/
  4.  
  5.  
  6. // game loop
  7. while (true) {
  8. var enemy1 = readline(); // name of enemy 1
  9. var dist1 = parseInt(readline(enemy1)); // distance to enemy 1
  10. var enemy2 = readline(); // name of enemy 2
  11. var dist2 = parseInt(readline(enemy2)); // distance to enemy 2
  12. if(dist1 > dist2){
  13.  
  14. print('Bee');
  15. print('Bumbleboom');
  16. print('Prickster');
  17. print('NeedleHead');
  18. print('Nipper');
  19. print('Bullet');
  20. print('GreenHornet');
  21. print('Stinger');
  22. print('Smasher');
  23. print('Poyzon');
  24. print('Thumper');
  25. print('Shooter');
  26. print('MilleniumBug');
  27. print('SharpBlood');
  28. print('Gnasher');
  29. print('Crusher');
  30. print('LightningPain');
  31.  
  32. print('Buzz');
  33. print('HotDroid');
  34. print('Rock');
  35. print('Bolt');
  36. print('Sectoid');
  37. print('Zap');
  38. }
  39. else{
  40. print('Buzz');
  41. print('Charger');
  42. print('Whacker');
  43. print('HardHat');
  44. print('MaulMaker');
  45. print('Fuse');
  46. print('NutCracker');
  47. print('Buster');
  48. print('Hitbot');
  49. print('DangerDart');
  50.  
  51.  
  52. }
  53. // Write an action using print()
  54. // To debug: printErr('Debug messages...');
  55.  
  56. //print('HotDroid'); // replace with correct ship name
  57.  
  58. }
  59. endwhile
Add Comment
Please, Sign In to add comment