Created
          February 1, 2019 03:18 
        
      - 
      
- 
        Save willyandan/34166162b6399628f26b29349368a5d4 to your computer and use it in GitHub Desktop. 
    pong.js - writePoints
  
        
  
    
      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 writePoints(){ | |
| ctx.font = "50px monospace"; | |
| ctx.fillStyle = "#fff"; | |
| // w/4 = 1/4 da tela = metade da tela do player 1 | |
| ctx.fillText(p1_points, w/4, 50); | |
| // 3*(w/4) = 3/4 da tela = metade da tela do player 2 | |
| ctx.fillText(p2_points, 3*(w/4), 50); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment