[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Uilijnen en aanpassen van Tetris spel.
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Uilijnen en aanpassen van Tetris spel.

Het echte opmaakwerk, alles vragen over HTMLen, CSSen en Javascripten.

Uilijnen en aanpassen van Tetris spel.

Berichtdoor Ty-Rap » 21 jan 2006 19:33

Laatst bijgewerkt door Ty-Rap op 01 jan 1970 01:00, in totaal 1 keer bewerkt.
Avatar gebruiker
Ty-Rap
wmpr
 
Berichten: 15
Geregistreerd: 28 dec 2005 20:43

Re: Uilijnen en aanpassen van Tetris spel.

Berichtdoor Derk » 22 jan 2006 11:25

Heb je mischien een linkje naar een pagina waarop we het probleem kunnen zien?
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Uilijnen en aanpassen van Tetris spel.

Berichtdoor Ty-Rap » 22 jan 2006 11:33

Het staat nog nergens online omdat het nog niet correct is. Als je een nieuw HTML document maakt met de codes op de juiste plaats zoals beschreven (een deel voor de HEAD en een BODY sectie) dan zie je het spel en het beschreven probleem.
Avatar gebruiker
Ty-Rap
wmpr
 
Berichten: 15
Geregistreerd: 28 dec 2005 20:43

Re: Uilijnen en aanpassen van Tetris spel.

Berichtdoor Rik » 22 jan 2006 11:44

Volgens mij klopt er niets van dit script.
De body wordt 3 keer geopend wat niet kan.
En <body language=.... ,daar klopt al helemaal niets van.
Als ik jou was zou ik naar een nieuw script zoeken.
Avatar gebruiker
Rik
wmpr
 
Berichten: 1576
Geregistreerd: 11 jun 2005 17:59

Re: Uilijnen en aanpassen van Tetris spel.

Berichtdoor Derk » 22 jan 2006 11:45

Ik krijg het niet voorelkaar dat de blokjes goed vallen, sorrie

Derk
Afbeelding
Avatar gebruiker
Derk
Beheerder
Beheerder
 
Berichten: 12634
Geregistreerd: 27 nov 2003 19:50
Woonplaats: Houten

Re: Uilijnen en aanpassen van Tetris spel.

Berichtdoor Ty-Rap » 07 feb 2006 21:29

Een betere versie gevonden die goed aan te passen is. De kleuren zijn natuurlijk ook aan te passen.

In de Head sectie

<script language="Javascript">
<!--
var t=''; t1=''; qul=0; xazi=0; done=1; sackisidone=1; sur=true; ldd=false;
var best=0; dav=false; m1=0; m2=0; m3=0; m4=0; xazidoneze=10;
var qulebi=0; n1=0; n2=0; n3=0; n4=0; strt=false; gacherdi=false;
var i=0; j=0; l=0; shua=540; shuabiji=50; shuavardna=20;
var dro, dro2, shemdegi;
var qvebi = new Array();
var ferebi = new Array('white','red','red','red','red','red','red','red');
var suruch=ferebi[0];
var tx='SPELINSTRUCTIES \n\nVerzamel zo veel mogelijk punten. Je krijgt de punten voor het maken van een volle rij of rijen en tijd is hierbij niet belangrijk. \nEen volle rij wordt automatisch verwijderd en je ontvangt dan ook de punten. \n\nOm de blokjes goed te plaatsen kan je ze sturen en eventueel draaien met de pijltjes toetsen. \n- Pijl naar links - Naar links verplaatsen \n- Pijl naar rechts - Naar rechts verplaatsen \n- Pijl naar boven - Draaien \n- Pijl naar onder - Versneld zakken \n\nJe kan, voordat je het spel begint, "Start niveau", "Rijen" en "Kolommen" naar eigen voorkeur instellen. \nHet "Spel niveau" (hoe snel de blokjes vallen) wordt automatisch ingevuld en wordt vanzelf verhoogt hoe langer het spel duurt. \n\n[Start] = Spel starten. \n[Pauze] = Spel onderbreken. \n[Doorgaan] = Spel verder spelen.';
var txabo='Hier kan je tekst plaatsen die je zelf leuk vindt';

function bruni()
{
axali(i1,j1,suruch,0); axali(i2,j2,suruch,0); axali(i3,j3,suruch,0); axali(i4,j4,suruch,0);
i1=m1; j1=n1; i2=m2; j2=n2; i3=m3; j3=n3; i4=m4; j4=n4;
axali(i1,j1,sur,sh); axali(i2,j2,sur,sh); axali (i3,j3,sur,sh); axali(i4,j4,sur,sh);
}

function brunva()
{
if((strt)&&(!gacherdi))
{
if (sh == 7) {sh=14;}
else
if (sh == 14) {sh=21;}
else
if (sh == 21) {sh=28;}
else
if (sh == 28) {sh=7;}
else
if (sh == 6)
{
m2=i2+1; n2=j2+1;
m1=i1; n1=j1;
m3=i3-1; n3=j3-1;
m4=i4-2; n4=j4-2;
if (kiara()) {
sh=13;
bruni();
}
}
else
if (sh == 13)
{
m1=i1; n1=j1;
m2=i2+1; n2=j2-1;
m3=i3-1; n3=j3+1;
m4=i4-2; n4=j4+2;
if (kiara()){
sh=20;
bruni();
}
}
else
if (sh == 20)
{
m1=i1; n1=j1;
m2=i2-1; n2=j2-1;
m3=i3+1; n3=j3+1;
m4=i4+2; n4=j4+2;
if (kiara()) {
sh=27;
bruni();
}
}
else
if (sh == 27)
{
m1=i1; n1=j1;
m2=i2-1; n2=j2+1;
m3=i3+1; n3=j3-1;
m4=i4+2; n4=j4-2;
if (kiara()) {
sh=6;
bruni();
}
}
else
if (sh == 5)
{
m1=i1; n1=j1;
m2=i2-1; n2=j2+1;
m3=i3; n3=j3+2;
m4=i2; n4=j2;
if (kiara()) {
sh=12;
bruni();
}
}
else
if (sh == 12)
{
m1=i1; n1=j1;
m2=i2+1; n2=j2+1;
m3=i3+2; n3=j3;
m4=i2; n4=j2;
if (kiara()) {
sh=19;
bruni();
}
}
else
if (sh == 19)
{
m1=i1; n1=j1;
m2=i2+1; n2=j2-1;
m3=i3; n3=j3-2;
m4=i2; n4=j2;
if (kiara()) {
sh=26;
bruni();
}
}
else
if (sh == 26)
{
m1=i1; n1=j1;
m2=i2-1; n2=j2-1;
m3=i3-2; n3=j3;
m4=i2; n4=j2;
if (kiara()) {
sh=5;
bruni();
}
}
else
if (sh == 4)
{
m1=i1; n1=j1;
m2=i4; n2=j4;
m3=i3+2; n3=j3;
m4=i4-1; n4=j4-1;
if (kiara()) {
sh=11;
bruni();
}
}
else
if (sh == 11)
{
m1=i1; n1=j1;
m2=i4; n2=j4;
m3=i3; n3=j3-2;
m4=i4-1; n4=j4+1;
if (kiara()) {
sh=18;
bruni();
}
}
else
if (sh == 18)
{
m1=i1; n1=j1;
m2=i4; n2=j4;
m3=i3-2; n3=j3;
m4=i4+1; n4=j4+1;
if (kiara()) {
sh=25;
bruni();
}
}
else
if (sh == 25)
{
m1=i1; n1=j1;
m2=i4; n2=j4;
m3=i3; n3=j3+2;
m4=i4+1; n4=j4-1;
if (kiara()) {
sh=4;
bruni();
}
}
else
if (sh == 3)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3+1; n3=j3+1;
m4=i2; n4=j2;
if (kiara()) {
sh=10;
bruni();
}
}
else
if (sh == 10)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3+1; n3=j3-1;
m4=i2; n4=j2;
if (kiara()) {
sh=17;
bruni();
}
}
else
if (sh == 17)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3-1; n3=j3-1;
m4=i2; n4=j2;
if (kiara()) {
sh=24;
bruni();
}
}
else
if (sh == 24)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3-1; n3=j3+1;
m4=i2; n4=j2;
if (kiara()){
sh=3;
bruni();
}
}
else
if (sh == 2)
{
m1=i1; n1=j1;
m2=i2-1; n2=j2+1;
m3=i2; n3=j2;
m4=i4-2; n4=j4-2;
if (kiara())
{
sh=9;
bruni();
}
}
else
if (sh == 9)
{
m1=i1; n1=j1;
m2=i2+1; n2=j2+1;
m3=i2; n3=j2;
m4=i4-2; n4=j4+2;
if (kiara())
{
sh=16;
bruni();
}
}
else
if (sh == 16)
{
m1=i1; n1=j1;
m2=i2+1; n2=j2-1;
m3=i2; n3=j2;
m4=i4+2; n4=j4+2;
if (kiara()) {
sh=23;
bruni();
}
}
else
if (sh == 23)
{
m1=i1; n1=j1;
m2=i2-1; n2=j2-1;
m3=i2; n3=j2;
m4=i4+2; n4=j4-2;
if (kiara()){
sh=2;
bruni();
}
}
else
if (sh == 1)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3-1; n3=j3-1;
m4=i4-2; n4=j4-2;
if (kiara()) {
sh=8;
bruni();
}
}
else
if (sh == 8)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3-1; n3=j3+1;
m4=i4-2; n4=j4+2;
if (kiara()) {
sh=15;
bruni();
}
}
else
if (sh == 15)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3+1; n3=j3+1;
m4=i4+2; n4=j4+2;
if (kiara())
{
sh=22;
bruni();
}
}
else
if (sh == 22)
{
m1=i1; n1=j1;
m2=i3; n2=j3;
m3=i3+1; n3=j3-1;
m4=i4+2; n4=j4-2;
if (kiara())
{
sh=1;
bruni();
}
}
}
}

function marcxniv()
{
if((strt)&&(!gacherdi))
{
if ((j1 > 1)&&(j2 > 1)&&(j3 > 1)&&(j4 > 1)&&
(qvebi[(i1-1)*j10+j1-1] != 29)&&
(qvebi[(i2-1)*j10+j2-1] != 29)&&
(qvebi[(i3-1)*j10+j3-1] != 29)&&
(qvebi[(i4-1)*j10+j4-1] != 29))
{
axali(i1,j1,suruch,0);
axali(i2,j2,suruch,0);
axali(i3,j3,suruch,0);
axali(i4,j4,suruch,0);
j1--; j2--; j3--; j4--;
axali(i1,j1,sur,sh);
axali(i2,j2,sur,sh);
axali(i3,j3,sur,sh);
axali(i4,j4,sur,sh);
}
}
}

function marjvniv()
{
if((strt)&&(!gacherdi))
{
if ((j1 < j10)&&(j2 < j10)&&(j3 < j10)&&(j4 < j10)&&
(qvebi[(i1-1)*j10+j1+1] != 29)&&
(qvebi[(i2-1)*j10+j2+1] != 29)&&
(qvebi[(i3-1)*j10+j3+1] != 29)&&
(qvebi[(i4-1)*j10+j4+1] != 29))
{
axali(i1,j1,suruch,0);
axali(i2,j2,suruch,0);
axali(i3,j3,suruch,0);
axali(i4,j4,suruch,0);
j1++; j2++; j3++; j4++;
axali(i1,j1,sur,sh);
axali(i2,j2,sur,sh);
axali(i3,j3,sur,sh);
axali(i4,j4,sur,sh);
}
}
}

function chavardes()
{
shua=shuavardna;
}

function extract(val)
{
if ((endOfCookie=document.cookie.indexOf(';',val))==-1)
{
endOfCookie=document.cookie.length;
}
return unescape(document.cookie.substring(val, endOfCookie));
}

function read(names)
{
var number=document.cookie.length;
var len=names.length;
var u=0;
var v;
while (u<=number)
{
v=u+len;
if (document.cookie.substring(u, v)==names)
return (extract(v));
u=document.cookie.indexOf(' ', u)+1;
if (u==0) break;
}
return (null);
}

shuadidi=shua;

coo=read('robest=');
if (coo == null)
{i20=22}
else
{i20=parseInt(coo)};

coo=read('cobest=');
if (coo == null)
{j10=11}
else
{j10=parseInt(coo)};

i19=i20-1; j9=j10-1; ij200=i20*j10;

for (l=1; l<=ij200; l++)
{
qvebi[l]=0;
}

if (dro != null)clearTimeout(dro);
if (dro2 != null)clearTimeout(dro2);

function daicke()
{
if((strt == false)&&(ldd))
{
sackisidone=1; done=1;
for (i=0; i<=9; i++)
{
if (document.forms[0].elements['doneairchie'].options[i].selected)
{
sackisidone=document.forms[0].elements['doneairchie'].options[i].text;
done=sackisidone;
qulebi=0;
for (j=1; j<=done; j++)
{
qulebi=qulebi+j*j*xazidoneze;
}
document.forms[0].elements[2].value=' '+done;
break;
}
}
var coo;
ricxvi();
achveneshemdegi();
for (l=1; l<=ij200; l++)
{
qvebi[l]=0; l1=l-1;
document.all['d'+l1].style.backgroundColor=suruch;
}
strt=true;
gacherdi=false;
qul=0; xazi=0;
cooknam='best2001'+i20+j10+'=';
coo=read(cooknam);
if (coo==null)
{best=0; nam=sax; st='0'}
else
{
k1=coo.indexOf('['); k3=k1+1; k4=coo.indexOf(']')-k1-1; k6=coo.length;
st=coo.substring(k3,k6); st=st.substring(0,k4);
best=parseInt(st);
nam=coo.substring(0,k1);
}
shua=shuadidi-shuabiji*done;
if (best==0)
document.forms[0].elements[0].value=''
else
document.forms[0].elements[0].value='Score: 0. '+nam+': '+best;
axaliqva();
if (dro != null)clearTimeout(dro);
rocadroa();
}
}

function ricxvi()
{
a=7*Math.random();
shemdegi=Math.ceil(a);
}

function bolos()
{
var cook;
var todayDate=new Date();
strt=false;
with (document)
{
if (qul>best)
{
best=qul;
todayDate.setDate(todayDate.getDate()+30);
st2=prompt('Gefeliciteerd met je mooie score! Type je naam en druk op [OK]',nam); nam=st2;
cooknam='best2001'+i20+j10+'=';
cookie=cooknam+nam+'['+best+']'+'; expires='+todayDate.toGMTString()+';';
forms[0].elements[0].value='Gefeliciteerd '+nam+'!';
}
else
{
forms[0].elements[0].value='Resultaat: '+qul+'. '+nam+': '+best;
}
with(document)
{
val=3*j10-1;
for (i=0; i<=val; i++)
{
all['p'+i].style.backgroundColor=suruch;
}
}
}
document.forms[1].elements[0].focus();
}

function rowsclick()
{
for (i=0; i<=3; i++)
{
if (document.forms[0].elements['rowsairchie'].options[i].selected)
{
i20=document.forms[0].elements['rowsairchie'].options[i].text;
todayDate=new Date();
todayDate.setDate(todayDate.getDate()+30);
document.cookie='robest='+i20+'; expires='+todayDate.toGMTString()+';';
break;
}
}
document.location=document.location.href;
}

function columnsclick()
{
for (i=0; i<=3; i++)
{
if (document.forms[0].elements['columnsairchie'].options[i].selected)
{
j10=document.forms[0].elements['columnsairchie'].options[i].text;
todayDate=new Date();
todayDate.setDate(todayDate.getDate()+30);
document.cookie='cobest='+j10+'; expires='+todayDate.toGMTString()+';';
break;
}
}
document.location=document.location.href;
}

function axaliqva()
{
shua=shuadidi-shuabiji*done;
sh=shemdegi;
sur=ferebi[sh];
if (sh == 1)
{i1=1; j1=5; i2=1; j2=6; i3=2; j3=5; i4=3; j4=5;}
else
if (sh == 2)
{i1=1; j1=5; i2=1; j2=4; i3=2; j3=5; i4=3; j4=5;}
else
if (sh == 3)
{i1=2; j1=6; i2=1; j2=6; i3=2; j3=7; i4=2; j4=5; sh=10;}
else
if (sh == 4)
{i1=2; j1=5; i2=2; j2=6; i3=1; j3=6; i4=3; j4=5;}
else
if (sh == 5)
{i1=2; j1=5; i2=2; j2=4; i3=1; j3=4; i4=3; j4=5;}
else
if (sh == 6)
{i1=1; j1=5; i2=1; j2=4; i3=1; j3=6; i4=1; j4=7; sh=27;}
else
if (sh == 7)
{i1=2; j1=5; i2=2; j2=6; i3=1; j3=6; i4=1; j4=5;};
if ((qvebi[i1,j1] == 29)||(qvebi[i2,j2] == 29)||(qvebi[i3,j3] == 29)||(qvebi[i4,j4] == 29))
{
bolos();
}
else
{
axali(i1,j1,sur,sh);
axali(i2,j2,sur,sh);
axali(i3,j3,sur,sh);
axali(i4,j4,sur,sh);
}
}

function axalish(ii,jj,ff)
{
l=(ii-1)*j10+jj; l1=l-1;
document.all['p'+l1].style.backgroundColor=ferebi[ff];
}

function axali(ii,jj,fil,ss)
{
l=(ii-1)*j10+jj;
if(qvebi[l] != ss)
{
qvebi[l]=ss; l1=l-1;
document.all['d'+l1].style.backgroundColor=fil;
}
}

function davardna()
{
dav=false;
for (k=1; k <=4; k++)
{
for (i=i20; i >= 1; i--)
{
n1=0;
for (j=1; j <= j10; j++)
{
l=(i-1)*j10+j;
if (qvebi[l] == 29) n1++
}
if (n1 == j10)
{
for (i1=i; i1>=2; i1--)
{
for (j1=1; j1 <= j10; j1++)
{
l=(i1-1)*j10+j1;
if(qvebi[l] != qvebi[l-j10])
{
l1=l-1;
qvebi[l]=qvebi[l-j10];
lj=l1-j10;
document.all['d'+l1].style.backgroundColor=document.all['d'+lj].style.backgroundColor;
}
}
}
dav=true;
xazi++
qul=qul+done*done;
if ((qul >= qulebi)&&(done < 10))
{
xazi=0;
done++;
qulebi=0;
for (i=1; i<=done; i++)
{
qulebi=qulebi+i*i*xazidoneze;
}
}
document.forms[0].elements[2].value=' '+done;
document.forms[0].elements[0].value='Score: '+qul+'. '+nam+': '+best+'.';
}
if (n1 == j10) break;
}
if (n1 != j10) break;
}
}

function achveneshemdegi()
{
val=3*j10-1;
for (i=0; i<=val; i++)document.all['p'+i].style.backgroundColor=suruch;
val=shemdegi;
if (val == 1)
{i1s=1; j1s=5; i2s=1; j2s=6; i3s=2; j3s=5; i4s=3; j4s=5;}
else
if (val == 2)
{i1s=1; j1s=5; i2s=1; j2s=4; i3s=2; j3s=5; i4s=3; j4s=5;}
else
if (val == 3)
{i1s=3; j1s=6; i2s=2; j2s=6; i3s=3; j3s=7; i4s=3; j4s=5;}
else
if (val == 4)
{i1s=2; j1s=5; i2s=2; j2s=6; i3s=1; j3s=6; i4s=3; j4s=5;}
else
if (val == 5)
{i1s=2; j1s=5; i2s=2; j2s=4; i3s=1; j3s=4; i4s=3; j4s=5;}
else
if (val == 6)
{i1s=2; j1s=5; i2s=2; j2s=4; i3s=2; j3s=6; i4s=2; j4s=7;}
else
if (val == 7)
{i1s=2; j1s=5; i2s=2; j2s=6; i3s=1; j3s=6; i4s=1; j4s=5;}
axalish(i1s,j1s,val); axalish(i2s,j2s,val);
axalish(i3s,j3s,val); axalish(i4s,j4s,val);
}

function rocadroa()
{
if ((strt == true)&&(gacherdi == false))
{
if ((i1>i19)||(i2>i19)||(i3>i19)||(i4>i19)
||(qvebi[(i1)*j10+j1] == 29)||(qvebi[(i2)*j10+j2] == 29)
||(qvebi[(i3)*j10+j3] == 29)||(qvebi[(i4)*j10+j4] == 29))
{
qvebi[(i1-1)*j10+j1]=29;
qvebi[(i2-1)*j10+j2]=29;
qvebi[(i3-1)*j10+j3]=29;
qvebi[(i4-1)*j10+j4]=29;
davardna ();
axaliqva();
if (strt)
{
ricxvi();
achveneshemdegi();
}
}
else
{
if(i1>2)
{
if(qvebi[(i1-2)*j10+j1] != sh)axali(i1,j1,suruch,0);
if(qvebi[(i2-2)*j10+j2] != sh)axali(i2,j2,suruch,0);
if(qvebi[(i3-2)*j10+j3] != sh)axali(i3,j3,suruch,0);
if(qvebi[(i4-2)*j10+j4] != sh)axali(i4,j4,suruch,0);
}
else
{
axali(i1,j1,suruch,0);
axali(i2,j2,suruch,0);
axali(i3,j3,suruch,0);
axali(i4,j4,suruch,0);
}
i1++; i2++; i3++; i4++;
axali(i1,j1,sur,sh);
axali(i2,j2,sur,sh);
axali(i3,j3,sur,sh);
axali(i4,j4,sur,sh);
}
dro = setTimeout('rocadroa()',shua);
return true;
}
}

function kiara()
{
vali=true;
if((n1<1)||(n2<1)||(n3<1)||(n4<1))vali=false;
if((n1>j10)||(n2>j10)||(n3>j10)||(n4>j10))vali=false;
if(vali)
{
if((m1<1)||(m2<1)||(m3<1)||(m4<1))vali=false;
if((m1>i20)||(m2>i20)||(m3>i20)||(m4>i20))vali=false;
}
if(vali)
{
if((qvebi[(m1-1)*j10+n1] == 29)||(qvebi[(m2-1)*j10+n2] == 29))vali=false;
if((qvebi[(m3-1)*j10+n3]== 29)||(qvebi[(m4-1)*j10+n4] == 29)) vali=false;
}
return vali;
}

function zemot()
{
self.focus();
document.forms[0].elements[0].value='Spel beginnen? ... klik op [Start]';
i=Math.round((i20-18)/2);
document.forms[0].elements['rowsairchie'].options[i].selected=true;
j=j10-9;
document.forms[0].elements['columnsairchie'].options[j].selected=true;
cooknam='best2001'+i20+j10+'=';
coo=read(cooknam);
ldd=true;
sax=read('abest=');
if(sax==null)sax=''; nam='';
document.forms[1].elements[0].focus();
}

document.onkeydown = keyDown;

function keyDown(DnEvents)
{
k=window.event.keyCode;
if(k == 39){marjvniv()}
else
if(k == 37){marcxniv()}
else
if(k == 38){brunva()}
else
if(k == 40){chavardes()};
}

function gachereba()
{
if (strt)
{
if (gacherdi == false)
{
gacherdi=true;
document.forms[1].elements[1].value='Doorgaan';
if (dro != null)clearTimeout(dro);
}
else
{
gacherdi=false;
document.forms[1].elements[1].value='Pauze';
dro=setTimeout('rocadroa()', shua);
}
}
}

function chacera(mc)
{
if(mc == 3){aso='p'} else {aso='d'};
document.write('<table border=0 CellPadding=0 CellSpacing=0>');
for (i=1; i<=mc; i++)
{
with(document)
{
write("<tr>");
for (j=0; j<=j9; j++)
{
l=(i-1)*j10+j;
write("<td align=center bgcolor="+suruch+" width=15 height=15 id='"+aso+l+"'></td>")
}
write("</tr>");
}
}
document.write('</table>');
}

if(!document.all){alert('Sorry, dit spel werkt alleen correct in MS Internet Explorer'); close();}

function hlp()
{
alert(tx);
}

function abo()
{
alert(txabo);
}
//-->
</script>

In de Body

<body onload="zemot()" bgcolor="#FFEEEE">
<center>
<table cellpadding="6" cellspacing="0" border="1" bordercolor="red" bgcolor="silver">
<tr>
<td align="center" valign="top">
<script language="Javascript">
<!--
chacera (3);
//-->
</script>
<form>
<table border="0" width="100%">
<tr>
<td align="center" colspan="2">
<input type="text" size="29" value="Even wachten, het spel wordt geladen!" style="color=red" style="background:#FFEEEE">
</td>
</tr>
<tr>
<td>
<input type="text" size="14" value="Spel niveau" style="color=red" style="background:#FFEEEE">
</td>
<td align="right">
<input type="text" size="14" value style="color: red; width:75; background:#FFEEEE; font-style:normal; font-variant:normal; font-weight:normal; font-size:10pt; font-family:times; height:21">
</td>
</tr>
<tr>
<td>
<input type="text" size="14" value="Start niveau" style="color=red" style="background:#FFEEEE">
</td>
<td align="right">
<select name="doneairchie" style="color: red; width:75; background:#FFEEEE; font-style:normal; font-variant:normal; font-weight:normal; font-size:10pt; font-family:times; height:21" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
<option>1</option>
<option>2</option>
<option selected>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select> </td>
</tr>
<tr>
<td>
<input type="text" size="14" value="Rijen" style="color=red" style="background:#FFEEEE">
</td>
<td align="right">
<select name="rowsairchie" style="color: red; font: 10pt times; width:75; background:#FFEEEE" onchange="rowsclick()" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
<option>18</option>
<option>20</option>
<option selected>22</option>
<option>24</option>
</select> </td>
</tr>
<tr>
<td>
<input type="text" size="14" value="Kolommen" style="color=red" style="background:#FFEEEE">
</td>
<td align="right">
<select name="columnsairchie" style="color: red; font: 10pt times; width:75; background:#FFEEEE" onchange="columnsclick()" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
<option>9</option>
<option>10</option>
<option selected>11</option>
<option>12</option>
</select> </td>
</tr>
</table>
</form>
<form>
<table border="0" width="100%">
<tr>
<td>
<input type="button" value="Start" onclick="daicke()" style="color: red; font: 10pt times; width:75; background:#FFEEEE" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
</td>
<td align="right">
<input type="button" value="Pauze" onclick="gachereba()" style="color: red; font: 10pt times; width:75; background:#FFEEEE" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
</td>
</tr>
<tr>
<td>
<input type="button" value="Instructie" onclick="hlp()" style="color: red; font: 10pt times; width:75; background:#FFEEEE" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
</td>
<td align="right">
<input type="button" value="Info" onclick="abo()" style="color: red; font: 10pt times; width:75; background:#FFEEEE" onmouseover="javascript: this.style.color='red'" onmouseout="javascript: this.style.color='red'">
</td>
</tr>
</table>
</form>
</td>
<td align="center">
<script language="Javascript">
<!--
chacera (i20);
//-->
</script>
</td>
</tr>
</table>
</center>
Avatar gebruiker
Ty-Rap
wmpr
 
Berichten: 15
Geregistreerd: 28 dec 2005 20:43


Keer terug naar HTML, CSS, Javascript



cron