         delegate?.match(theMatch, didReceiveData: data, fromPlayer: playerID)
     }
     
-    func match(theMatch: GKMatch!, player playerID: String!, didChangeState state: GKPlayerConnectionState) {
+    func match(theMatch: GKMatch!, layer playerID: String!, idChangeState state: GKPlayerConnectionState) {
         if match != theMatch {
             return
         }

        scoreObject.value = Int64(score)
        GKScore.reportScores([scoreObject]) { (error) -> Void in
            if error != nil {
                println("Error in reporting leaderboard scores: \(error)")
            }
        }
    }

    
    func authenticationChanged() {
        if GKLocalPlayer.localPlayer().authenticated && !authenticated {
            print("Authentication changed: player authenticated")
            authenticated = true
        } else {
            print("Authentication changed: player not authenticated")
            authenticated = false
        }
    }
    
    func lookupPlayers() {
        let playerIDs = match.players.map { ($0 as GKPlayer).playerID! }
        
        GKPlayer.loadPlayersForIdentifiers(playerIDs) { (players, error) -> Void in
            if error != nil {
                print("Error retrieving player info: \(error?.localizedDescription)")
                self.matchStarted = false
                self.delegate?.matchEnded()
            } else {
                guard let players = players else {
                    print("Error retrieving players")
                    return
                }
                
                for player in players {
                    print("Found player: \(player.alias)")
                    self.playersDict[(player as GKPlayer).playerID!] = player
                }
                
                self.matchStarted = true
