daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Nov 17th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.  
  3. <body>
  4.  
  5.  
  6. <script>
  7.  
  8. var movex = 95;
  9. var speedx = 130.5;
  10. var top1 = 185;
  11.  
  12.  
  13. var movey = 185;
  14. var speedy = 125.5;
  15.  
  16. var duca = 0;
  17.  
  18. var movex1 = 75;
  19. var speedx1 = 132.5;
  20. var top2 = 197;
  21.  
  22.  
  23. var movey1 = 197;
  24. var speedy1 = 125.5;
  25.  
  26. var duca1 = 0;
  27.  
  28. var turn = 1;
  29.  
  30. var box = [12];
  31.  
  32. for(num = 1; num < 13; num++) { box[num] = 0; }
  33.  
  34. var cpic = [5];
  35.  
  36. for (d = 1; d < 5; d++) { cpic[d] = 0 }
  37.  
  38.  
  39. start();
  40.  
  41. function change(click){
  42.  
  43. if ((turn == 1) && (box[click] == 0 )){document.getElementById(click).src = "red.jpg";
  44. box[click] = 1;
  45. turn++;
  46.  
  47.  
  48. }
  49.  
  50. if ((turn == 2) && (box[click] == 0)) {document.getElementById(click).src = "blue.jpg";
  51. box[click] = 1;
  52. turn++;
  53. }
  54.  
  55.  
  56. if ((box[1] == 1) && (box[3]== 1) && (box[7]==1) && (box[8]==1) && (turn == 2) && (cpic[1] == 0)) {document.getElementById("c1").src = "red_let.jpg";
  57. cpic[1]= 1;
  58. turn = 1;
  59. }
  60. if ((box[2] == 1) && (box[4]== 1) && (box[8]==1) && (box[9]==1) && (turn == 2) && (cpic[2] == 0)) {document.getElementById("c2").src = "red_let.jpg";
  61. cpic[2]= 1;
  62. turn = 1;}
  63. if ((box[3] == 1) && (box[5]== 1) && (box[10]==1) && (box[11]==1) && (turn == 2) && (cpic[3] == 0)) {document.getElementById("c3").src = "red_let.jpg";
  64. cpic[3]= 1;
  65. turn = 1;}
  66. if ((box[4] == 1) && (box[6]== 1) && (box[11]==1) && (box[12]==1) && (turn == 2) && (cpic[4] == 0)) {document.getElementById("c4").src = "red_let.jpg";
  67. cpic[4]= 1;
  68. turn = 1;}
  69.  
  70. if ((box[1] == 1) && (box[3]== 1) && (box[7]==1) && (box[8]==1) && (turn == 3) && (cpic[1] == 0)) {document.getElementById("c1").src = "blue_let.jpg";
  71. cpic[1]= 1;
  72. turn = 2;}
  73. if ((box[2] == 1) && (box[4]== 1) && (box[8]==1) && (box[9]==1)&& (turn == 3) && (cpic[2] == 0)) {document.getElementById("c2").src = "blue_let.jpg";
  74. cpic[2]= 1;
  75. turn = 2;}
  76. if ((box[3] == 1) && (box[5]== 1) && (box[10]==1) && (box[11]==1)&& (turn == 3) && (cpic[3] == 0)) {document.getElementById("c3").src = "blue_let.jpg";
  77. cpic[3]= 1;
  78. turn = 2;}
  79. if ((box[4] == 1) && (box[6]== 1) && (box[11]==1) && (box[12]==1)&& (turn == 3) && (cpic[4] == 0)) {document.getElementById("c4").src = "blue_let.jpg";
  80. cpic[4]= 1;
  81. turn = 2;}
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. if(turn == 3) {turn = 1;}
  90.  
  91. }
  92.  
  93. function start(){
  94.  
  95.  
  96. document.write('<img src = "grid.jpg" name = "grid" Style = "position:absolute; left:100px ; top:125px " width = 490 height 500>')
  97.  
  98. document.write('<img src = "blank.jpg" id = c1 style = "position:absolute;left:220; top: 199" width= 110 height= 100 >')
  99. document.write('<img src = "blank.jpg" id = c2 style = "position:absolute;left:350; top: 199" width= 110 height= 100 >')
  100. document.write('<img src = "blank.jpg" id = c3 style = "position:absolute;left:220; top: 325" width= 110 height= 100 >')
  101. document.write('<img src = "blank.jpg" id = c4 style = "position:absolute;left:350; top: 325" width= 110 height= 100 >')
  102.  
  103.  
  104.  
  105. for(i=1;i<7;i++)
  106. {
  107. if (duca == 2){duca = 0; movex = 95; top1 = movey+=speedy}
  108. duca++;
  109. move1 = movex+=speedx;
  110. document.write('<img src = "trans.jpg" id = '+i+' width = 100.5 height = 10  style = "position:absolute; left:'+move1+'; top:'+top1+'" Onclick="change('+i+')">')
  111. }
  112.  
  113. for(b=7;b<13;b++)
  114. {
  115. if (duca1 == 3){duca1 = 0; movex1 = 75; top2 = movey1+=speedy1}
  116. duca1++;
  117. move2 = movex1+=speedx1;
  118. document.write('<img src = "trans.jpg" id = '+b+' width = 10 height = 97  style = "position:absolute; left:'+move2+'; top:'+top2+'" Onclick="change('+b+')">')
  119. }
  120.  
  121.  
  122.  
  123. }
  124.  
  125. </script>
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. </body>
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143. </html>
RAW Paste Data
Top