call srand tickcount; call bingo 35; endmacro; bingo: ##i = 0; while( ##i < ##1 ) { ##dest[##i] = ##i + 1; ##i = ##i + 1; } ##i = 0; while( ##i < ##1 ) { call rand; ##r = ##return % ( ##1 - ##i ) + ##i; ##tmp = ##dest[##r]; ##dest[##r] = ##dest[##i]; ##dest[##i] = ##tmp; ##i = ##i + 1; } ##keta = strlen( str( ##1 ) ); ##i = 0; while( ##i < ##1 ) { ##next = ##i + 10; if ( ##next > ##1 ) { ##next = ##1; } ##ii = ##i; while( ##ii < ##next ) { if ( ##ii > ##i ) { insert " "; } call KetaSoroe ##ii+1, ##keta; insert $$return; ##ii = ##ii + 1; } insert "\n"; ##ii = ##i; while( ##ii < ##next ) { if ( ##ii > ##i ) { insert " "; } call KetaSoroe ##dest[##ii], ##keta; insert $$return; ##ii = ##ii + 1; } insert "\n\n"; ##i = ##next; } return; KetaSoroe: ##i = ##2 - strlen( str( ##1 ) ); $$result = ""; if ( ##i >= 0 ) { while( ##i > 0 ) { $$result = $$result + " "; ##i = ##i - 1; } } $$result = $$result + str( ##1 ); return $$result; rand: #rand_x = #rand_x * 214013 + 2531011; if ( #rand_x < 0 ) { return ( ( #rand_x + 1 ) / 65536 - 1 ) & 32767; } return #rand_x / 65536 & 32767; srand: #rand_x = ##1; return;