Example #1
0
 void Awake()
 {
     boardHistory           = new Stack <char[, ]>();
     gameControllerLogic    = new GameControllerLogic();
     gameOverSoundClip      = gameObject.AddComponent <AudioSource>();
     gameOverSoundClip.clip = winningSoundClip;
     gameMode = PlayerPrefs.GetString("gameMode");
     if (!(gameMode == "PlayerVComputer"))
     {
         undoButton.SetActive(false);
         hintButton.SetActive(false);
     }
     SetGameControllerReferenceOnButtons();
     boardHistory.Push(GenerateBoardFromImages(buttonList));
     defaultValues();
 }