pourquoi l'adresse du player2 n'est pas reconnu dans le test comme le winner ? voici les fonctions "function proposeLetter(uint256 _gameId, string memory _letterToGuess, string memory _wordToGuess) public {
        require(_gameId != 0, "Bad ID");
        currentPlayer = getActivePlayer(_gameId);
        require(playerBalances[_gameId][msg.sender].balance > 0, "you didn't bet");
        require(bytes(_letterToGuess).length == 1, "a single letter");
        require(state == State.firstLetter, "Bad State");
        string memory letterFiltered = filteredLetter(_letterToGuess);
        checkLetter(_gameId, letterFiltered);
        state = State.inProgress;
        proposeWord(_gameId, _wordToGuess, currentPlayer);
    }" "function proposeWord(uint256 _gameId, string memory _wordToGuess, address _currentPlayer) public {
        require(state == State.inProgress, "Bad State");
        string memory filteredWord = wordFiltered(_wordToGuess);
        if (isWordCorrect(_wordToGuess)) {
            emit WordWin(_gameId, filteredWord);
            games[_gameId].winner = _currentPlayer;
            state = State.finished;
            emit GameFinished(_gameId);
            addBetToPlayer(_currentPlayer);
        } else {
            currentWord = _wordToGuess;
            emit WordGuessedFalse(_gameId, _wordToGuess);
            playersSwitched(_gameId);
        }
    }" "function withdraw(uint256 _gameId, uint256 _amount) public payable {
        address winner = games[_gameId].winner;
        currentPlayer = msg.sender;
        require(currentPlayer == games[_gameId].player1 || currentPlayer == games[_gameId].player2, "You re not a player");
        require(!games[_gameId].player1HasWithdrawn || !games[_gameId].player2HasWithdrawn, "withdrawn balance");
        uint256 balance = playerBalances[_gameId][currentPlayer].balance;
        require(balance >= _amount, "Insufficient balance");
        require(winner == currentPlayer, "You are not the winner");
        
        playerBalances[_gameId][currentPlayer].balance -= _amount;
        (bool success, ) = payable(currentPlayer).call{value: _amount}("");
        require(success, "The withdrawal failed");
        if (currentPlayer == games[_gameId].player1) {
            games[_gameId].player1HasWithdrawn = true;
        } else {
            games[_gameId].player2HasWithdrawn = true;
        }
        emit Withdraw(_gameId);
    }" le test "context ("FONCTION RETRAIT - GAGNANT", () => {
        before(async function() {
            penduelInstance = await Penduel.new(subId);
            const value = web3.utils.toWei("1", "ether");
            const letterToGuess = "i";
            const wordToGuess = "immuable";
            const currentWord = "immuable";
            await penduelInstance.createGame({ from: player1 });
            await penduelInstance.joinGame({ from: player2 });
            await penduelInstance.deposit({ from: player1, value: value });
            await penduelInstance.deposit({ from: player2, value: value });
            await penduelInstance.updateStateFirstLetter();
            const gameId = 1;
            const currentPlayer = player2; 
            await penduelInstance.proposeLetter(gameId, letterToGuess, wordToGuess, {from: currentPlayer});
            const updateState = await penduelInstance.state();
            assert.equal(updateState, 5, "L'état devrait être inProgress");
            await penduelInstance.proposeWord(gameId, "immuable", currentPlayer);
            await penduelInstance.getIsWordCorrect(currentWord);
            
        });

        describe ("Vérifie la fonction withdraw avec le gagnant", () => {

            it("devrait permettre au gagnant de retirer avec succès", async () => {
                const gameId = 1;
                const currentPlayer = player2; 
                const amount = 2;
                const initialBalance = await penduelInstance.playerBalances(gameId, currentPlayer); 
                const game = await penduelInstance.games(gameId);
                assert.equal(game.winner, currentPlayer, "L’adresse du gagnant ne correspond pas à l’adresse attendue");
                const { logs } = await penduelInstance.withdraw(gameId, amount, { from: currentPlayer });
                ;
                const finalBalance = await penduelInstance.playerBalances(gameId, currentPlayer);
                
                const difference = finalBalance - initialBalance;
                assert.isAbove(difference, 0, "Le retrait n'a pas réussi");
               
                expect(game.player2HasWithdrawn).to.be.true;
                expect(logs).to.have.lengthOf(1);
                expectEvent(logs[0], "Withdraw", { _gameId: new BN(gameId) });
            });
        });"