Rock Paper Scissors x 99

In this project the second instruction tells you:

“A function called setPlayerMoves, which will take a string representing a player (in the form of ‘Player One’ or ‘Player Two’), three move types, and three move values, and set the correct global move variables. The method signature for this function should be as follows: setPlayerMoves(player, moveOneType, moveOneValue, moveTwoType, moveTwoValue, moveThreeType, moveThreeValue)”

This confuses me. After the ‘Player One’ or ‘Player Two’ part is the text still listing things this function takes in or is it telling me the functionality of the function?Confusion

the setPlayerMoves function is taking those parameters inside of the function, i.e. if we are setting the value of PlayerOne in player parameter of setPlayerMoves then further we will also give the other parameters as well which will set the three move types and their values for a player.
I hope u get an answer for what you were asking…
Happy Coding :slightly_smiling_face:

have you completed this project??
or setPlayerMoves() Main functionality and edge cases…??
if anyone has completed setPlayerMoves() function with all its tests in running state i.e. Main Fuctionality and edge cases here is my function. Its main functionality is working but I’m stuck on one edge case i.e. should not set moves if a move type is missing
here is my code which according to me is fine, but it ain’t working, I can’t figure out the problem.

const setPlayerMoves = (player, moveOneType, moveOneValue, moveTwoType, moveTwoValue, moveThreeType, moveThreeValue) =>
    if(player === 'Player One')
        playerOneMoveOneType = moveOneType;
        playerOneMoveOneValue = moveOneValue;
        playerOneMoveTwoType = moveTwoType;
        playerOneMoveTwoValue = moveTwoValue;
        playerOneMoveThreeType = moveThreeType;
        playerOneMoveThreeValue = moveThreeValue;
    else if(player === 'Player Two')
        playerTwoMoveOneType = moveOneType;
        playerTwoMoveOneValue = moveOneValue;
        playerTwoMoveTwoType = moveTwoType;
        playerTwoMoveTwoValue = moveTwoValue;
        playerTwoMoveThreeType = moveThreeType;
        playerTwoMoveThreeValue = moveThreeValue;

//edge cases or data providers as described in test.js file

/* if any parameter(move type) is undefined like rock,paper,scissor is not 
written there, then all global moves types and values will be set undefined 
for which we have to set all the parameters values and types, i.e. when 
calling setPlayerMoves function we have to carefully select types from rock 
paper scissors, types should not be undefined and invalid e.g rocks, hello etc. */
else if(player === 'Player One' &&(moveOneType === undefined || moveTwoType === undefined || moveThreeType === undefined))
    {//should not set moves if a move type is missing
    //player one moves converting to undefined
    playerOneMoveOneType = undefined;
    playerOneMoveOneValue = undefined;
    playerOneMoveTwoType = undefined;
    playerOneMoveTwoValue = undefined;
    playerOneMoveThreeType = undefined;
    playerOneMoveThreeValue = undefined;
    //console.log('player moves are set to undefined as one move type is missing')
    else if(player === 'Player Two' && (moveOneType === undefined || moveTwoType === undefined || moveThreeType === undefined))
    {//player two moves converting to undefined
    playerTwoMoveOneType = undefined;
    playerTwoMoveOneValue = undefined;
    playerTwoMoveTwoType = undefined;
    playerTwoMoveTwoValue = undefined;
    playerTwoMoveThreeType = undefined;
    playerTwoMoveThreeValue = undefined;

Kindly, help me out on this one.