Advertisement
Guest User

Js-GodGame[BROKEN]

a guest
Jun 5th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var ResWood = 0;
  2. var ResStone = 0;
  3. var ResIron = 0;
  4. var ResClay = 0;
  5. var ResTar = 0;
  6. var Population = 1;
  7. var Gold = 50;
  8.  
  9. var none = "--none--";
  10. var TownHall = "TownHall";
  11. var WoodHut = "WoodHut";
  12.  
  13. var OneOne = none;
  14. var OneTwo = none;
  15. var OneThree = none;
  16. var OneFour = none;
  17. var OneFive = none;
  18.  
  19. var TwoOne = none;
  20. var TwoTwo = none;
  21. var TwoThree = none;
  22. var TwoFour = none;
  23. var TwoFive = none;
  24.  
  25. var ThreeOne = none;
  26. var ThreeTwo = none;
  27. var ThreeThree = TownHall;
  28. var ThreeFour = none;
  29. var ThreeFive = none;
  30.  
  31. var FourOne = none;
  32. var FourTwo = none;
  33. var FourThree = none;
  34. var FourFour = none;
  35. var FourFive = none;
  36.  
  37. var FiveOne = none;
  38. var FiveTwo = none;
  39. var FiveThree = none;
  40. var FiveFour = none;
  41. var OneFive = none;
  42.  
  43. var RowOne = [OneOne, OneTwo, OneThree, OneFour, OneFive];
  44. var RowTwo = [TwoOne, TwoTwo, TwoThree, TwoFour, TwoFive];
  45. var RowThree = [ThreeOne, ThreeTwo, ThreeThree, ThreeFour, ThreeFive];
  46. var RowFour = [FourOne, FourTwo, FourThree, FourFour, FourFive];
  47. var RowFive = [OneOne, OneTwo, OneThree, OneFour, OneFive];
  48.  
  49. function Build(type, loc){
  50. this.type = type;
  51. this.loc = loc;
  52.  
  53. switch(loc){
  54. case OneOne:
  55.         OneOne = type
  56.         break;
  57. case OneTwo:
  58.         OneTwo = type
  59.         break;
  60. case OneThree:
  61.         OneThree = type
  62.         break;
  63. case OneFour:
  64.         OneFour = type
  65.         break;
  66. case OneFive:
  67.         OneFive = type
  68.         break;
  69. case TwoOne:
  70.         TwoOne = type
  71.             break;
  72. case TwoTwo:
  73.         TwoTwo = type
  74.         break;
  75. case TwoThree:
  76.         TwoThree = type
  77.         break;
  78. case TwoFour:
  79.         TwoFour = type
  80.         break;
  81. case TwoFive:
  82.         TwoFive = type
  83.         break;
  84. case ThreeOne:
  85.         ThreeOne = type
  86.         break;
  87. case ThreeTwo:
  88.         ThreeTwo = type
  89.         break;
  90. case ThreeThree:
  91.         ThreeThree = type
  92.         break;
  93. case ThreeFour:
  94.         ThreeFour = type
  95.         break;
  96. case ThreeFive:
  97.         ThreeFive = type
  98.         break;
  99. case FourOne:
  100.         FourOne = type
  101.         break;
  102. case FourTwo:
  103.         FourTwo = type
  104.         break;
  105. case FourThree:
  106.         FourThree = type
  107.         break;
  108. case FourFour:
  109.         FourFour = type
  110.         break;
  111. case FourFive:
  112.         FourFive = type
  113.         break;
  114. case FiveOne:
  115.         FiveOne = type
  116.         break;
  117. case FiveTwo:
  118.         FiveTwo = type
  119.         break;
  120. case FiveThree:
  121.         FiveThree = type
  122.         break;
  123. case FiveFour:
  124.         FiveFour = type
  125.         break;
  126. case FiveFive:
  127.         FiveFive = type
  128.         break;
  129. default:
  130.         return false;
  131.                 }
  132. }
  133. function ShowTown(){
  134.     console.log(RowOne);
  135.     console.log(RowTwo);
  136.     console.log(RowThree);
  137.     console.log(RowFour);
  138.     console.log(RowFive);
  139.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement