JS Dots and Boxes Part 2 (Automate Computer Player)
Mt. Ford Studios
In the second and final part of this JavaScript tutorial to create the pen-and-pencil game, Dots and Boxes, we add some code to automate the computer player. The computer is now able to select an appropriate square based on a predefined priority list. First, it will select any square that it can complete, thereby scoring a point. Next, it will try to select a square which doesn’t give away any points. And then finally, if exhausted of all other options, it will select a square that will give the player an opportunity to score. Download the code below and have a tinker!
CODE Dots and Boxes Part 2 (Automate Computer Player): https://drive.google.com/open?id=1HvkCQv3CFJp6C24TovZN35hSIMX5BmYD
USEFUL LINKS Dots and Boxes: https://en.wikipedia.org/wiki/Dots_and_Boxes Visual Studio Code: https://code.visualstudio.com/
FIND US ON FACEBOOK https://www.facebook.com/MountfordStudios/ ... https://www.youtube.com/watch?v=HMCQ4OAhsl4
38349159 Bytes