public void OnClickAI(bool target = false)
 {
     if (target)
     {
         OnAIselection?.Invoke(transform.position);
     }
     if (activeGamestate == GameState.PLAYERX && affiliation == Player.None)
     {
         affiliation = Player.X;
         //button.image.color = ColorPresets.X;
         OnPlayerAction?.Invoke(activeGamestate);
         AfterPlayerAction?.Invoke(activeGamestate);
     }
     else if (activeGamestate == GameState.PLAYERO && affiliation == Player.None)
     {
         affiliation = Player.O;
         //button.image.color = ColorPresets.O;
         OnPlayerAction?.Invoke(activeGamestate);
         AfterPlayerAction?.Invoke(activeGamestate);
     }
     else
     {
         return;
     }
     text.text = affiliation.ToString();
     if (glitchFontOnHover != null)
     {
         StopCoroutine(glitchFontOnHover);
         isTextGlitching = false;
     }
     text.fontSize = 10;
     playAnimation = true;
 }
 public void OnEnterAI(bool target = false)
 {
     if (target)
     {
         OnAIselection?.Invoke(transform.position);
     }
     isMouseOver = true;
     OnMouseOverTile?.Invoke(true, affiliation);
     if (affiliation == Player.None)
     {
         if (activeGamestate == GameState.PLAYERO)
         {
             text.text      = Player.O.ToString();
             newTextColor   = Color.black;
             newButtonColor = Color.white;
         }
         else if (activeGamestate == GameState.PLAYERX)
         {
             text.text      = Player.X.ToString();
             newTextColor   = Color.white;
             newButtonColor = Color.black;
         }
     }
 }