Getting ready...

We will need to create a specific move class for the Tic-Tac-Toe board derived from the parent class we created at the beginning of the chapter:

using UnityEngine; 
using System.Collections; 
 
public class MoveTicTac : Move 
{ 
    public int x; 
    public int y; 
    public int player; 
 
    public MoveTicTac(int x, int y, int player) 
    { 
        this.x = x; 
        this.y = y; 
        this.player = player; 
    } 
} 

Get Unity 2018 Artificial Intelligence Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.