ScrambleSquaresSolver/Program.cs
/// <summary>
/// Takes the input file of tiles, and returns all orientations of that tile.
/// </summary>
/// <param name="inputTiles"></param>
/// <returns></returns>
Takes the input file of tiles, and returns all orientations of that tile.
Takes the input file of tiles and returns all orientations of that tile .
private static List<Tile> BuildAllOrientations(List<Tile> inputTiles)
        {
            var tilesToProcess = new List<Tile>();
            foreach (var tile in inputTiles)
            {
                tilesToProcess.Add(tile);
                tilesToProcess.Add(new Tile(
                    tile.Id,
                    tile.LeftSide,
                    tile.TopSide,
                    tile.RightSide,
                    tile.BottomSide,
                    Orientation.D90));
                tilesToProcess.Add(new Tile(
                    tile.Id,
                    tile.BottomSide,
                    tile.LeftSide,
                    tile.TopSide,
                    tile.RightSide,
                    Orientation.D180));
                tilesToProcess.Add(new Tile(
                    tile.Id,
                    tile.RightSide,
                    tile.BottomSide,
                    tile.LeftSide,
                    tile.TopSide,
                    Orientation.D270));
            }
            return tilesToProcess;
        }
private static List < Tile > BuildAllOrientations ( List < Tile > inputTiles ) { var tilesToProcess = new List < Tile > ( ) ; foreach ( var tile in inputTiles ) { tilesToProcess . Add ( tile ) ; tilesToProcess . Add ( new Tile ( tile . Id , tile . LeftSide , tile . TopSide , tile . RightSide , tile . BottomSide , Orientation . D90 ) ) ; tilesToProcess . Add ( new Tile ( tile . Id , tile . BottomSide , tile . LeftSide , tile . TopSide , tile . RightSide , Orientation . D180 ) ) ; tilesToProcess . Add ( new Tile ( tile . Id , tile . RightSide , tile . BottomSide , tile . LeftSide , tile . TopSide , Orientation . D270 ) ) ; } return tilesToProcess ; }
Takes the input file of tiles, and returns all orientations of that tile.
Takes the input file of tiles and returns all orientations of that tile .
None
inputTiles
List<Tile>
None