Example #1
0
 public bool lineFilledInOneColor(int y)
 {
     BlockTile.blockColor col = tile[0, y].blockTile.GetComponent <BlockTile>().color;
     for (int x = 1; x < 10; ++x)
     {
         if (tile[x, y].blockTile.GetComponent <BlockTile>().color != col)
         {
             return(false);
         }
     }
     return(true);
 }
Example #2
0
    public void randColor()
    {
        BlockTile.blockColor col = (BlockTile.blockColor)Random.Range(0, 7);

        foreach (Transform tile in transform)
        {
            if (tile.GetComponent <BlockTile>() == null)
            {
                return;
            }
            else
            {
                tile.GetComponent <BlockTile>().setColor(col);
            }
        }
    }