public void ResetPosition(Player player, Role role) { int index = listings.FindIndex(x => x.Player == player); if (index != -1) { PlayerListing playerObject = listings[index]; playerObject.isReady = false; playerObject.setPlayerRole((int)role); } UpdateRoleBtnState(); checkGameStartButton(); }