Ejemplo n.º 1
0
        public void SavePuzzle(Solved solved, int blockId)
        {
            var text     = solved.FormatSolution();
            var fileName = Path.Combine(FileHelper.PatchDirectoryName("problems"), "puzzles", $"block{blockId:000}.sol");

            File.WriteAllText(fileName, text);
            Save(solved, 500 + blockId);
        }
Ejemplo n.º 2
0
        public void Save(Solved solved, int id, string suffix = null)
        {
            var text        = solved.FormatSolution();
            var fileName    = Path.Combine(FileHelper.PatchDirectoryName("problems"), "all", $"prob-{id:000}{suffix}.sol");
            var buyFileName = Path.Combine(FileHelper.PatchDirectoryName("problems"), "all", $"prob-{id:000}{suffix}.buy");

            File.WriteAllText(fileName, text);
            File.WriteAllText(buyFileName, solved.FormatBuy());
        }