27 Haziran 2024 Perşembe

Memory Game

One busy day, 15 minutes before the end of working hours, someone came up at a bank. I quickly went to the bank, and as the bank door was opening, the security guard with the phone in his hand said to me: "Look, he made a game." While I was quickly taking the order for transactions, I said: "We'll do it, am I going to hurt you?". I wrote this game one year after this dialogue. Of course, I still have no idea what that security guard meant for what purpose... The software can be copied, it can be shown as an example. It can be changed as long as it is not referenced. (After changing,if you can say wow I got this from here...) You can request the advanced software otherwise inform aganis from the e-mail at the end of the page.


https://drive.google.com/file/d/1Sgg3IofMnjI5FwdhFkZzDjbU9Zz9EvL8/view?usp=drive_link


 

<html> 
<head meta charset="utf-8">
 <title>Hafiza Oyunu</title>
 <script> 
<!-- newEdit:dudukadinshoppingdistrict@gmail.com --> 
  var kusresimleri; 
  var BTNPREFIX = 'btn'; 
  var secim = -1; 
  const resimleri = [ "SAHIN" , "AKBABA" , "SERCE" , "KERKENEZ" , "KARGA" , "BALIKCIL" , "ATMACA" , "DOGAN" , "PUHU" , "BAYKUS" , "AGACKAKAN" , "CIGIRTKAN" , "KARTAL" , "TAVUK" , "GUGUK" , "HOROZ" , "PAPAGAN" , "SAKA" , "MUHABBET" , "ARIKUSU" , "DEVEKUSU" , "CALIKUSU" , "BULBUL" , "LEYLEK" , "PELIKAN" , "SAKSAGAN" , "KIRLANGIC" , "CIVGIN" , "ORDEK" , "SIGIRCIK" ,"CIVGIN" , "TAVUS" , "TINAMU" , "KASUARI" , "EMU" , "KIVI" , "KAZ" , "SAKARCA" , "SUNA" , "ANGIT" , "CIKRIKCIN" , "CAMURCUN" , "FIYU" , "KILKUYRUK" , "PATEKESI" , "ELMABAS" , "PATKA" , "PUFLA" , "ALTIN" , "TARAK" , "MEGAPOT" , "MALEO" , "CACALAKA" , "GUAN" , "HOKKO" , "KOLIN" , "TORKO" , "KEKLIK" , "ARGUS" , "SULUN" , "BILDIRCIN" ];
//create resimleri array

  const boskutular = [ "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7" , "8" , "9" , "10" , "11" , "12" , "13" , "17" , "23" , "25" , "26" , "29" , "30" , "31" , "32" , "33" , "36" , "38" , "39" , "42" , "44" , "46" , "49" , "51" , "52" , "53" , "54" , "55" , "57" , "59" , "60" , "61" , "62" , "64" , "65" , "68" , "69" , "70" , "71" , "72" , "75" , "76" , "77" , "78" , "81" , "82" , "83" , "84" , "85" , "86" , "87" , "88" , "89" , "90" , "91" , "96" , "97" , "103" , "104" , "109" , "110" , "114" , "116" , "117" , "123" , "125" , "127" , "129" , "130" , "131" , "137" , "139" , "140" , "142" , "143" , "144" , "145" , "146" , "147" , "148" , "149" , "150" , "151" , "152" , "153" , "154" , "155" ];
//creat bos kutular array

  function diziOlustur(buyukluk) {
   buyukluk = parseInt(buyukluk);
//describe buyukluk 
   var len = 62;
   len=parseInt(len); 
//describe len lenght
   console.log(buyukluk);
   kusresimleri = new Array(len);
//create new memory array
   for (var i = 0; i < len / 2; i++){
    kusresimleri[i] = i;
    kusresimleri[(len / 2) + i] = i;
   }
//create array lenght
   console.log(kusresimleri);
   kusresimleri=karistir(kusresimleri);
   console.log(kusresimleri);
//return random value
  }
  function cevir(idx){
   idx = parseInt(idx);
// describe idx
   console.log(idx);
//rememorized
   if (secim < 0) {
    var btn1 = document.getElementById(BTNPREFIX + idx);
//create button that value less than zero
    secim = idx;
//create value on secim
    btn1.innerText = kusresimleri[idx]+" "+resimleri[kusresimleri[idx]];
//wrote on button
    } else {
     btn1 = document.getElementById(BTNPREFIX + secim );
//take value on button
     var btn2 = document.getElementById(BTNPREFIX + idx );
//take button value
     btn2.innerText = kusresimleri[idx]+" "+resimleri[kusresimleri[idx]];
//wrote on button
    if (kusresimleri[idx] == kusresimleri[secim]) {
// is taked value,idetical value
    btn1.parentElement.removeChild(btn1);
    btn2.parentElement.removeChild(btn2);
//erase buttons same value
    } else {
//not, rewrite buttons' timeout
     setTimeout(function () {
      btn1.innerText = "___X___";
      btn2.innerText = "___X___";
     }, 2222)
//than change buttons text
    }
   secim = -1;
//repeat procces
   }
  }
  function karistir(array) {
//call back array
   var c = array.length, t, r;
//define t,r,c
   while (0 !== c) {
//count end to first
    r = Math.floor(Math.random() * c);
// selection index by random, less than value c
    c -= 1;
    t = array[c];
    array[c] = array[r];
    array[r] = t;
// swap with index
   }
  return array
  }
//call back array
  function bosdolu(say){
   say = parseInt(say);
   for (var k=0; k < 94 ; k++){
    var sayi=boskutular[k];
    sayi=parseInt(sayi);
    var sayilar=0;
    if(sayi == say){
     break;
    }else{
     sayilar=sayi;
    }
   }
   say=sayilar;
   return say;
  }
//check on beginning matrises that empty value
  function hazirla(buyukluk) {
   buyukluk = parseInt(buyukluk);
   document.clear();
   document.body.innerHTML = '<h3>Kutulari cifter cifter acin!<br>Ayni anlamlar silinir.<br>Cift acilmis kutunun kapanmasi yaklasik 2 saniyedir.<br>Ayni kutuya ardarda iki defa basarsaniz oyun biter.</h3>';
   diziOlustur(buyukluk);
//create dizi that buyukluk value
   var eleman = document.getElementsByTagName('body')[0];
   var tablo = document.createElement('table');
   tablo.style.width = '100%';
   tablo.setAttribute('border', '0');
   var tabloelemani = document.createElement('tbody');
//create tables factor
   var xc = buyukluk;
   var yc = buyukluk + 1;
// Single x Double = Double
   var p = 0;
   var m = 0;
   for (var x = 0; x < xc ; x++) {
    var sutun = document.createElement('tr');
// 1 colon
    for (var y = 0; y < yc ; y++){
     var z=((x*13)+y);
// define matris that long z
     var yazilankus=bosdolu(z);
// check on is there yazilankus
     yazilankus=parseInt(yazilankus); 
      if(yazilankus==0) { 
       var satir = document.createElement('td');
       satir.appendChild(document.createTextNode('\u0020')); 
       satir.innerHTML = '<button type="button" id=""><br><br><h3>________</h3><br></button>';
       sutun.appendChild(satir);
       p++;
      }else{
       var satir = document.createElement('td');
       satir.appendChild(document.createTextNode('\u0020'));
       satir.innerHTML = '<button type="button" id="' + BTNPREFIX + m + '" onclick="cevir(' + m + ');"><br><br><h3>____X____</h3><br></button>';
       sutun.appendChild(satir);
       p++;
       m++;
      }
// loop yazilankus
     }
     tabloelemani.appendChild(sutun);
//add line on tbdy
    }
    tablo.appendChild(tabloelemani);
//add colon on tbl
    eleman.appendChild(tablo);
// add table on body object
//added
   }
</script>
</head>
<body>
 <script>
   hazirla(12);
 </script>
</body>
</html>

Edit:dudukadinshoppingdistrict@gmail.com
You can also send the articles to dudukadinshoppingdistrict@gmail.com that you deem important.

Hiç yorum yok:

Yorum Gönder

Software Can Be...

 Nowadays, the focus has started on how software can be used for a long time and how to reach more people in the long term. I am not talking...