User:Sealbudsman/End City.js

var HOUSE_TOWER_GENERATOR = function( c ){

if( c > 8 ) { }	else { var i = Math.floor(Math.random * 3); if( i === 0 ){ } else if( i === 1 ){ if( TOWER_GENERATOR( c + 1 ) ){ return true; }; } else if( i === 2 ){ if( TOWER_GENERATOR( c + 1 ) ){ return true; }; }	}	return false; };

var TOWER_GENERATOR = function( c ){

var t = ( Math.floor(Math.random * 3) === 0 ? true : false ); var i = 1 + Math.floor(Math.random * 3); for( var j = 0; j < 1; j++){ if( j < i - 1 && Math.floor(Math.random * 2) === 1) {			t = true; }	}	if(t){ for(var r = 0; r < 4; r++){ if(Math.floor(Math.random * 2) === 1){ if( TOWER_BRIDGE_GENERATOR( c + 1 ) ){ return true; }; }		}	}	else { if(c!==7){ if( FAT_TOWER_GENERATOR( c + 1 ) ){ return true; }; }	}	return false; };

var TOWER_BRIDGE_GENERATOR = function( c ){

var i = Math.floor(Math.random * 4) + 1; if( Math.floor(Math.random * (10-c) ) === 0 ){ return true; }	else if( HOUSE_TOWER_GENERATOR( c + 1 ) ){ return true; } return false; };

var FAT_TOWER_GENERATOR = function( c ){ for(var i=0; i<2 && Math.floor(Math.random * 3) !== 0; i++){ for(var r = 0; r < 4; r++){ if(Math.floor(Math.random * 2) === 1){ if( TOWER_BRIDGE_GENERATOR( c + 1 ) ){ return true; }; }		}	}	return false; }

var has = 0; var hasnot = 0; var trial = function{

if( TOWER_GENERATOR( 1 ) ){ has ++; }else{ hasnot++; } };

for(var i=0;i<1000000;i++){ trial; }

document.writeln(has + ' : ' + hasnot);