mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 15:16:33 -08:00
Merge pull request #565 from ribtips/main
modified the AI logic to make it a bit more difficult to win based on tic-tac-toe game theory
This commit is contained in:
@@ -110,7 +110,7 @@ sub check_for_corners {
|
|||||||
@precedence=(1,9,7,3,5,2,4,6,8);
|
@precedence=(1,9,7,3,5,2,4,6,8);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@precedence=(5,1,9,7,3,2,4,6,8);
|
@precedence=(5,2,4,6,8,1,9,7,3);
|
||||||
}
|
}
|
||||||
foreach my $move (@precedence) {
|
foreach my $move (@precedence) {
|
||||||
my $validity=&check_occupation($move);
|
my $validity=&check_occupation($move);
|
||||||
|
|||||||
Reference in New Issue
Block a user