New way to approch this?

if(select[7] != “player”){
select[7]=“computer”
}
else if (select[7] = “player” && select[6] !=“player”){
select[6] = “computer”
}
This is what I have so far, the order should be 7, 6, 8, 5, 9, 4, 10, 3, 11, 2, 12 and is there anyway to approch this without using if statement? Is there a faster way? All helps are appreciated