Beispiel #1
0
        // GET: Admin/Create
        public ActionResult Create()
        {
            SudokuOutputView model = new SudokuOutputView();

            string[] OutputSudoku = new string[80];

            Sudo.Sudo NewSudoku = new Sudo.Sudo();
            NewSudoku.start();
            OutputSudoku = NewSudoku.FullSudoku;
            model.Values = OutputSudoku;
            return(View("sudoku", model));
        }
Beispiel #2
0
        public SudokuOutputView GetCells()
        {
            SudokuOutputView Output = new SudokuOutputView();

            int counter = new int();

            string[] cells = CellValues.Split(',');
            foreach (var Number in cells)
            {
                Output.Values[counter] = Number;
            }
            return(Output);
        }
Beispiel #3
0
        /// <summary>
        /// declares 'StartTime' within the session as equal to the current time
        /// and passes ID and Difficulty to SudokuForView
        /// then passes the returned string to StringToArray
        /// </summary>
        /// <param name="id"></param>
        /// <param name="Difficulty"></param>
        /// <returns></returns>
        public ActionResult Sudoku(int id, string Difficulty)
        {
            Session["StartTime"] = DateTime.Now;

            SudokuOutputView model = new SudokuOutputView();
            SudoCRUD         s     = new SudoCRUD();

            Sudo.Sudo s2   = new Sudo.Sudo();
            string[]  temp = s.SudokuForView(id, Difficulty);

            model.Values   = s2.StringToArray(temp[1]);
            model.SudokuID = id;
            return(View(model));
        }