Advertisement
arvekj

Untitled

Apr 26th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.            function findTechLayout(city) {
  2.                 for (var k in city) {
  3.                     //console.log(typeof(city[k]), "1.city[", k, "]", city[k])
  4.                     if ((typeof (city[k]) == "object") && city[k] && 0 in city[k] && 8 in city[k]) {
  5.                         if ((typeof (city[k][0]) == "object") && city[k][0] && city[k][0] && 0 in city[k][0] && 15 in city[k][0]) {
  6.                             if ((typeof (city[k][0][0]) == "object") && city[k][0][0] && "BuildingIndex" in city[k][0][0]) {
  7.                                 return city[k];
  8.                             }
  9.                         }
  10.                     }
  11.                 }
  12.                 return null;
  13.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement