Problem with random chess piece moveplate generator

I’m making chess where chess pieces have random abilities (like queen moves like pawn, knight moves like rook etc.), but every time when i click to chess piece it’s abilities changes(at first pawn moves like king after second click it starts going like knight), how to make it gets it’s abilities at start and saves it until game finishes without changes.

public void RandomMove()
{
System.Random randomizer = new System.Random();
for (int i = 0; i < 1; i++)
{
float funcToChoose = randomizer.Next(6);

            switch (funcToChoose)
            {
                case 0:
                   King_Move();
                    break;
                case 1:
                    Queen_Move();
                    break;
                case 2:
                    Knight_Move();
                    break;
                case 3:
                   Bishop_Move();
                    break;
                case 4:
                   Rook_Move();
                    break;
                case 5:
                   WhitePawn_Move();
                    break;
                case 6:
                  BlackPawn_Move();
                    break;
            }

       
    }
  
}

public void InitiateMovePlates()
{
    switch (this.name)
    {
        case "White_queen":
           RandomMove();
            break;
        case "Black_queen":
           RandomMove();   
            break;
        case "White_knight":
            RandomMove();
            break;
        case "Black_knight":
            RandomMove();
            break;
        case "White_bishop":
           RandomMove();
            break;
        case "Black_bishop":
           RandomMove();
              break;
        case "Black_king":
            RandomMove();
              break;
        case "White_rook":
           RandomMove();
            break;
        case "Black_rook":
           RandomMove();
            break;
        case "White_pawn":
            RandomMove();
            break;
        case "Black_pawn":
           RandomMove();
            break;
    }
 
}

I’d say your best bet is create something like bool firstMove = true; and an int moveIndex = 0; then after RandomMove() set firstMove = false;. After that add moveIndex = functToChoose; before your switch after the movement. Finally wrap System.Random randomizer = new System.Random(); for (int i = 0; i < 1; i++) { float funcToChoose = randomizer.Next(6); in an if that only runs if(firstMove == true;

The only problem is your for loop. Is there a reason you are using a loop for a single iteration?

IT WORKED, Thank you very much! I wish you all the best!