satranç tahtası ve at piyonu örneği(javascript ile satranç tahtası ve satranç oyunu yapmak)

Javascript kodları satranç tahtası ve at piyonu örneği(javascript ile satranç tahtası ve satranç oyunu yapmak) Hazır program kodları hakkında bilgi paylaş; HTML-Kodu: <!-- ONE STEP TO INSTALL KNIGHT GAME: 1. Copy the coding into the BODY of your HTML document --&...
Cevapla
WebMasTer SiTeSi
 
Seçenekler
  #1  
Arama 25-11-2007, 11:15
banias - ait Kullanıcı Resmi (Avatar)
Pseudo Coder
Üyelik Tarihi: 23/08/07
Mesajlar: 1.177
 
     WS-Ticareti: (2)
Blog Yazıları: 2
Teşekkürleri: 9
100 Msg. 180 Tşkr.
Rep Gücü: 100 banias has much to be proud ofbanias has much to be proud ofbanias has much to be proud ofbanias has much to be proud ofbanias has much to be proud ofbanias has much to be proud ofbanias has much to be proud ofbanias has much to be proud of

satranç tahtası ve at piyonu örneği(javascript ile satranç tahtası ve satranç oyunu yapmak)

HTML-Kodu:
<!-- ONE STEP TO INSTALL KNIGHT GAME:

  1.  Copy the coding into the BODY of your HTML document  --> <!-- STEP ONE: Paste this code into the BODY of your HTML document  --> <BODY> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Original:  Ben Joffe --> <!-- Web Site:  http://www.joffe.tk/ --> <script>
document.write('<table style=cursor:pointer;cursor:hand border=2 cellpadding=0 cellspacing=0>')
var squarenum=0;
var curnum=0;
curcol="#996633";
for(var count1=0; count1<8; count1++){
document.write('<tr>')
if(curcol=="#996633") {curcol="#663300"} else curcol="#996633";
for(var count=0; count<8; count++){
if(curcol=="#996633") {curcol="#663300"} else curcol="#996633";
document.write('<td bgcolor='+curcol+' id='+curnum+' name='+squarenum+' width=50 height=50 onclick=\"moveto(this);\"> </td>');
curnum++;
squarenum++
}
document.write('</tr>')
curnum+=20;
}
document.write('</table>')
document.getElementById(0).innerHTML="<img src=horse.gif>";
document.getElementById(0).bgColor="#FF99FF";
var squares=new Array(true);

var score=0;
var where;
var oldwhere=0;
function moveto(square){
where=square.id;
if ((oldwhere==where-26 || oldwhere==where-30 || oldwhere==where-55 || oldwhere==where-57 || oldwhere-26==where || oldwhere-30==where || oldwhere-55==where || oldwhere-57==where))
{
score++;
document.getElementById("scorey").innerHTML=score;
document.getElementById(oldwhere).innerHTML=" ";
document.getElementById(where).innerHTML="<img src=horse.gif width=48 height=48>";
document.getElementById(where).bgColor="#FF99FF";
oldwhere=where;
squares[square.name]=true;
}
for (var i=0; i<63; i++) if (squares[i]!=true) var stuffed=true
if (stuffed!=true) {alert("You win in only "+score+" moves!");window.location.href=window.location.href;}
}
</script> <p>Score: <span id=scorey>0</span><br> <p><center> <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size:  2.06 KB -->
__________________
| | |
| |
|
|
|
Alıntı ile Cevapla
Cevapla
Arama Etiketleri: , , , , ,



Seçenekler


Benzer Konular
Konu Konu Açanlar Forum Cevaplar Güncel Mesajlar
Satranç - SMFChesss Mod forum.fbcumhuriyeti.net SMF modifikasyonları 6 07-10-2008 04:35
Gorki Online Satranç Scripti Miliotta ASP scriptler 3 05-08-2008 10:20
Büyük Satranç Tahtası kitap özeti B737 E-kitap 0 14-02-2008 01:05
Yapay zeka örneği: Satranç oyunu (javascript ile) banias Javascript kodları 0 25-11-2007 10:51
Photoshop'da Eskimiş Yazı Tahtası Hazırlama Professionel Photoshop 0 24-11-2007 03:50


Webmaster web tasarım online reviews ~ Kadınlar blogu ~ Apple iPhone, iPod Touch ( iTouch ) Forum ~ iPhone