using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;

public class SpellingBeeController : MonoBehaviour
{   
    private string[] words;
    // Start is called before the first frame update
    void Start() {
        TextAsset textFile = Resources.Load<TextAsset>("SpellingBee/words");
        string fileContents = textFile.text;

        words = fileContents.Split('\n');        
    }

    // Update is called once per frame
    void Update() {
        int randomIndex = UnityEngine.Random.Range(0, words.Length - 1);
        string randomWord = words[randomIndex];

        Debug.Log(randomWord);
    }
}
