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

public class Levels
{

    private int[] shipProgress;
    private int[] moonProgress;

    public Levels() 
    {
        shipProgress = new int[15]{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
        moonProgress = new int[15]{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
    }
    
    public Levels(LevelsData data) 
    {
        shipProgress = data.GetShipProgress();
        moonProgress = data.GetMoonProgress();
    }

    public void ChangeShipProgress(int level, int state) 
    {
        shipProgress[level] = state;
    }

    public void ChangeMoonProgress(int level, int state)
    {
        moonProgress[level] = state;
    }

    public int[] GetShipProgress() 
    {
        return shipProgress;
    }

    public int [] GetMoonProgress() 
    {
        return moonProgress;
    }

    public int GetShipProgressOnIndex(int index) 
    {
        return shipProgress[index];
    }

    public int GetMoonProgressOnIndex(int index)
    {
        return moonProgress[index];
    }
}
