// constants const SIZE = 208; const NUM_PLAYERS = 4; const tSand = "desert_rough"; const tDunes = "desert_wave"; const tFineSand = "desert_sahara"; const tCliff = "cliff_desert"; const tForest = "grass_sand_75|flora/trees/palm_b.xml"; const tGrassSand75 = "grass_sand_75"; const tGrassSand50 = "grass_sand_50"; const tGrassSand25 = "grass_sand_25_2"; const tDirt = "dirt_hard"; const tDirtCracks = "dirt_cracks"; const tShore = "sand"; const tWater = "water_2"; const tWaterDeep = "water_3"; const oTree = "flora/trees/palm_b.xml"; const oBerryBush = "flora_bush_berry"; const oBush = "props/flora/bush_dry_a.xml"; const oSheep = "fauna_sheep"; const oDeer = "fauna_deer"; const oMine = "geology_stone_light"; const oDecorativeRock = "geology/gray1.xml"; // some utility functions to save typing function paintClass(cl) { return new TileClassPainter(cl); } function avoidClasses(/*class1, dist1, class2, dist2, etc*/) { var ar = new Array(arguments.length/2); for(var i=0; i