Created
          October 27, 2016 15:29 
        
      - 
      
- 
        Save rjriel/1d70c9f169c3a8556e149a6efeaca68d to your computer and use it in GitHub Desktop. 
    MOVE PLAYED
  
        
  
    
      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
    
  
  
    
  | socket.on('move played', (move) => { | |
| // someone has played a move in our game | |
| // if the move just played wasn't by us, it is now | |
| // our turn to play. | |
| if (move.player != playerId) { | |
| console.log(`opponent performed ${move.result}`) | |
| performMove() | |
| } | |
| }) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment