using UnityEngine;

public class Score : MonoBehaviour
{

    public static bool GameFinished()
    {
        return nextPizza == 12;
    }

    public static ResultType GetResult(int pizzaNum)
    {
        return results[pizzaNum-1];
    }

    public static void ScoreCash()
    {
        results[nextPizza] = ResultType.Success;
        nextPizza++;
    }

    public static void ScoreFail()
    {
        results[nextPizza] = ResultType.Failure;
        nextPizza++;
    }

    public enum ResultType
    {
        None,
        Success,
        Failure
    }
    private static ResultType[] results;
    private static int nextPizza = 0;

    void Start()
    {
        ResetResults();
    }

    private void ResetResults()
    {
        results = new ResultType[12];
        for (int i = 0; i < results.Length; i++)
        {
            results[i] = ResultType.None;
        }
        nextPizza = 0;
    }

    
}
