This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /*skor tahtası özellikleri*/ | |
| #scoreboard{ | |
| width: 50%; | |
| height: 20%; | |
| margin: auto; | |
| border: 2px solid olive; /*seçici stilini görmek için farazi deger, kaldırmayı unutmayın :)*/ | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #scoreLeft, #scoreRight{ | |
| color: #b25b00; | |
| font-family: sans-serif; | |
| font-size: 400%; | |
| margin-top: 4%; | |
| } | |
| #scoreLeft{ | |
| float: left; | |
| } | |
| #scoreRight{ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | html, body{ | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| /*oyun alanı özellikleri*/ | |
| #gameArea{ | |
| width: 100%; | |
| height: 100%; | |
| background-color: #845ec2; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // stick değişkenleri | |
| var stickLeft = document.getElementById('stickLeft'); | |
| var stickRight = document.getElementById('stickRight'); | |
| stickLeft.style.top = window.innerHeight/2 + 'px'; | |
| stickRight.style.top = window.innerHeight/2 + 'px'; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | document.onkeydown = function(e){ | |
| console.log(e); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | document.onkeydown = function(e){ | |
| switch(e.keyCode){ | |
| // sol çubuk | |
| case 87: | |
| console.log('w tusuna basildi'); | |
| break; | |
| case 83: | |
| console.log('s tusuna basildi'); | |
| // sağ çubuk | |
| case 38: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function pxAdd(numb){ | |
| return numb + 'px'; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | document.onkeydown = function(e){ | |
| switch(e.keyCode){ | |
| // sol çubuk | |
| case 87: | |
| stickLeft.style.top = pxAdd(parseInt(stickLeft.style.top) - 30); | |
| break; | |
| case 83: | |
| stickLeft.style.top = pxAdd(parseInt(stickLeft.style.top) + 30); | |
| // sağ çubuk | |
| case 38: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | switch(e.keyCode){ | |
| // sol çubuk | |
| case 87: | |
| if(parseInt(stickLeft.style.top) <= 0){ | |
| stickLeft.style.top = stickLeft.style.top; | |
| }else{ | |
| stickLeft.style.top = pxAdd(parseInt(stickLeft.style.top) - 30); | |
| } | |
| break; | |
| case 83: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // stick değişkenleri | |
| var stickLeft = document.getElementById('stickLeft'); | |
| var stickRight = document.getElementById('stickRight'); | |
| stickLeft.style.top = window.innerHeight/2 + 'px'; | |
| stickRight.style.top = window.innerHeight/2 + 'px'; | |
| function pxAdd(numb){ | |
| return numb + 'px'; | |
| } |