ML>
JavaScript Traffic Animation
----------------------------------------------------------------------",
"J----------------------------------------------------------------------",
"p----------------------------------------------------------------------",
"d ----------------------------------------------------------------------",
"ic----------------------------------------------------------------------",
"ni ----------------------------------------------------------------------",
"akeArray.argu----------------------------------------------------------------------",
"me----------------------------------------------------------------------",
"n----------------------------------------------------------------------",
"ts[i];
}
// ma----------------------------------------------------------------------",
" \\-----------------------------------------------------------------------------------------------",
"----------------------------------------------------------------------",
"--------------------------------------------",
"'s)
----------------------------------------------------------------------",
"
----------------------------------------------------------------------",
"carwidth----------------------------------------------------------------------",
" = 0;
----------------------------------------------------------------------",
"numcars = 1----------------------------------------------------------------------",
"3;
carheight = 7;
f----------------------------------------------------------------------",
"ra----------------------------------------------------------------------",
"me----------------------------------------------------------------------",
"widt----------------------------------------------------------------------",
"h = 7----------------------------------------------------------------------",
"0;
c----------------------------------------------------------------------",
"ars = new----------------------------------------------------------------------",
" Array(numcars); // all the cars
frame = new MakeArray(
" ",
" ",
" ",
" ",
" ",
"----------------------------------------------------------------------",
" ");
cars[0] = new MakeArray(
" ",
" ",
" .-O ",
" ==-( <-`7) ",
" ,/.//__/\\.",
"--`-'----`-'",
" ");
cars[1] = new MakeArray(
" ",
" ",
" ___ ",
" _/[]L\\__ ",
" (_,.__,._)", "---`'--`'--",
" ");
cars[2] = new MakeArray(
" ",
" ",
" __ ",
" _____|L\\___ ",
" (_,.___ __,._)",
"---`'-----`'--",
" ");
cars[3] = new MakeArray(
" ",
" ",
" ",
" __~p\\___ ",
" (_,._ _,._)",
"---`'--`'--",
" ");
cars[4] = new MakeArray(
" ",
" ",
" ____ ",
" /_/CL\\___ ",
" \\_, .__,._)",
"---`'--`'--",
" ");
cars[5] = new MakeArray(
" ",
" ",
" ____ ",
" |_| L\\___ ",
" |_,._ _,._)",
"---`'--`'--",
" ");
cars[6] = new MakeArray(
" ",
" ",
" _______ ",
" /____/CL\\___ ",
" |_,._____,._)",
"---`'- ----`'--",
" ");
cars[7] = new MakeArray(
" ",
" ",
" ________ ",
" |[][][] L\\ ",
" |_,._ __,._)",
"---`'---`'--",
" ");
cars[8] = new MakeArray(
" ",
" ",
" _________ ",
" |______/ L\\",
" |_,.___,._|",
"---`'---`'--",
" ");
cars[9] = new MakeArray(
" ",
" ",
" ______ ___ ",
" /[] []\\ _/[]L\\__ ",
" \\__,.__|-(_,.__,._)",
"----`'------`'--`'--",
" ");
cars[10] = new MakeArray(
" ___________________ ________________________ ",
" | | | || -.\\ ",
" | | | || |_\\\\",
" |___________________| |___________________|| - |",
" B_,-.___________,-._|-B_,-._,-.____________|,-._)",
"---`-'-----------`-'-----`-'-`-'-------------`-'--",
" ");
cars[11] = new MakeArray(
" ________________________________ H___ ",
" P MK'98| H ..\\ ",
" | _______| H |_\\\\",
" | |.========H - |",
" B_,-._,-._______________/ |,-._,-._H_,-.)",
"---`-'-`-'------------------`-'-`-'---`-'-",
" ");
cars[12] = new MakeArray(
" ________________________________ H___ ",
" | MK'98||H ..\\ ",
" | _______||H |_\\\\___ ",
" | |.======='H - |",
" B_,-._,-._______________/ |,-._,-._H____,-._)",
"---`-'-`-'------------------`-'-`-'------`-'--",
" ");
function addCar() {
x = Math.floor(Math.random() * numcars);
for (y=0;y
/ RIPT>