board)
{_t num = 0; (size_t i = 0; i <8; i + +)
{(size_t j = 0; j <8; j + +)
{(board [i] [j]. getT () == BLUE)
} (board [i] [j]. getT () == BLUEKING) (frag_king_ai (board, i, j)) num + +;
}
} num;
} _t Tree :: num_moves (point ** board)
{_t num = 0; (size_t i = 0; i <8; i + +)
{(size_t j = 0; j <8; j + +)
{(board [i] [j]. getT () == RED)
} (board [i] [j]. getT () == REDKING) (frag_king_ai (board, i, j)) num + +;
}
} num;
} ** Tree :: ai_copy_swap (point ** board, size_t pos_x, size_t pos_y, size_t new_pos_x, size_t new_pos_y)
{** tmp; tmp_1; = new point * [8]; (size_t i = 0; i <8; i + +)
{[i] = new point [8]; (size_t j = 0; j <8; j + +)
{[i] [j] = board [i] [j];
}
} Tree :: ai_move_rating (point ** points, size_t i, size_t j)
{rank = 0; (points [i] [j]. getT () == REDKING) rank + = 25; (frag_king_ai (points, i, j)) rank + = 100; (frag_comp_bool ( points, i, j)) rank + = 50; ((j-1) <8 && (j +1) <8 && (i +1) <8)
{(points [i +1] [j +1]. getT () == EMPTYCELL | | points [i +1] [j-1]. getT () == EMPTYCELL) rank + = 15;
} ((i +1) <8 && (i +2) <8 && (j-1) <8 && (j +2) < 8)
{(points [i +1] [j +1]. getT () == BLUE && points [i +2] [j +2]. getT () == BLUE) rank-= 50;
} ((i-1) <8 && (j-1) <8 && (j-2) <8 && (i +2) < 8)
{(points [i +1] [j-1]. getT () == BLUE && points [i +2] [j-2]. getT () == BLUE) rank-= 50;
} ((i +1) <8 && (i +2) <8 && (j +1) <8)
{(points [i +1] [j +1]. getT () == EMPTYCELL && points [i +2] [j]. getT () == BLUE) rank + = 3;
} ((i +1) <8 && (i +2) <8 && (j-1) <8 && (j +2) < 8)
{(points [i +1] [j-1]. getT () == EMPTYCELL && points [i +2] [j +2]. getT () == BLUE) rank + = 3;
} rank;
} Tree :: human_move_rating (point ** points, size_t i, size_t j)
{rank = 0; (points [i] [j]. getT () == BLUEKING) rank + = 5; (frag_king_ai (points, i, j)) rank + = 100; ((j +1) <8 && (j-1) <8 && (i-1) <8)
{(points [i-1] [j-1]. getT () == EMPTYCELL | | points [i-1] [j +1]. getT () == EMPTYCELL) rank + + ;
} ((i-1) <8 && (i-2) <8 && (j +1) <8 && (j-2) < 8)
{(points [i-1] [j-1]. getT () == RED && points [i-2] [j-2]. getT () == RED) rank-= 5;
} ...