Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C# by K ( 16 years ago )
public void AlphaBetaBialy(Stan s, int depth, int[] ruch)
{
int alpha = -65;
int beta = 65;
// przeszukiwanie wszystkich stanow potomnych
for (int i = 0; i < 64; i++)
{
if (!s.mozliwyRuch(g.ruchy[i][0], g.ruchy[i][1])) continue;
int val = AlphaBetaBialy(s.tworzStanPotomny(g.ruchy[i][0], g.ruchy[i][1]), depth - 1, alpha, beta, false);
if (val > alpha)
{
ruch[0] = g.ruchy[i][0]; ruch[1] = g.ruchy[i][1];
alpha = val;
}
if (alpha >= beta)
{
ruch[0] = g.ruchy[i][0]; ruch[1] = g.ruchy[i][1];
return;
}
}
}
Revise this Paste
Parent: 15027