var bordcolor = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"];
function keydown(e){
tmr = tmr + 1;
k = e.keyCode;
if(k==37) curve = curve - 5;
if(k==38) undulation = undulation - 20;
if(k==39) curve = curve + 5;
if(k==40) undulation = undulation + 20;
draw_road(curve, undulation);
}
function draw_road(di, ud){
:
wkcolor = (6 - tmr % 7 + i) % 7;
・tmrは、キーを押すたびにカウントアップされます。