3 ms·
You are correct. I updated it to this: who_wins(well W) { for each piece P { for each landing state of piece P in well W { well W2
by qntm 15y ago
You are correct. I updated it to this:
who_wins(well W) {
for each piece P {
for each landing state of piece P in well W {
well W2 = result
if(that_makes_a_line(W2)) {
next piece
}
if(who_wins(W2) == PLAYERWINS) {
next piece
}
}
// AI wins every landing state
return AIWINS
}
// Player wins every piece
return PLAYERWINS
}
print who_wins(empty_well)