Assets/Scripts/State.cs
/// <summary>
/// Gets a string representation of the complete state, i.e.
/// the digger location and the entire map
/// </summary>
/// <returns>The full state string</returns>
Gets a string representation of the complete state, i.e.
the digger location and the entire map
Gets a string representation of the complete state i . e . the digger location and the entire map
public string GetFullStateString()
    {
        var levelString = "";
        for(var i = 0; i < Tiles.GetLength(0); i++)
        {
            var rowString = "";
            for(var j = 0; j < Tiles.GetLength(1); j++)
            {
                rowString += (Tiles[i, j] + ",");
            }
            levelString += (rowString.Substring(0, rowString.Length - 1) + "_");
        }
        levelString = levelString.Substring(0, levelString.Length - 1);
        return string.Format("x={0};y={1};k={2};t={3}", DiggerX, DiggerY, AvailableKeys, levelString);
    }
public string GetFullStateString ( ) { var levelString = " " ; for ( var i = 0 ; i < Tiles . GetLength ( 0 ) ; i ++ ) { var rowString = " " ; for ( var j = 0 ; j < Tiles . GetLength ( 1 ) ; j ++ ) { rowString += ( Tiles [ i , j ] + " " ) ; } levelString += ( rowString . Substring ( 0 , rowString . Length - 1 ) + " " ) ; } levelString = levelString . Substring ( 0 , levelString . Length - 1 ) ; return string . Format ( " " , DiggerX , DiggerY , AvailableKeys , levelString ) ; }
Gets a string representation of the complete state, i.e.
Gets a string representation of the complete state i . e .
The full state string
The full state string