Ejemplo n.º 1
0
        public IActionResult BoardDisplay(Settingsmodel model)
        {
            Board board;

            if (ModelState.IsValid)
            {
                if (model.FullyPseudoRandom && model.IsSmallBoard) // 3-4 (Pseudo)Random
                {
                    board = BoardLogic.PseudoRandom();
                }
                else if (!model.FullyPseudoRandom && model.IsSmallBoard) // 3-4 Fixed
                {
                    board = BoardLogic.Normal();
                }
                else if (model.FullyPseudoRandom && !model.IsSmallBoard) // 5-6 (Pseudo)Random
                {
                    board = BigBoardLogic.PseudoRandom();
                }
                else if (!model.FullyPseudoRandom && !model.IsSmallBoard) // 5-6 Fixed
                {
                    board = BigBoardLogic.Normal();
                }
                else
                {
                    board = BoardLogic.Normal(); // fake it till you make it
                }
            }
            else
            {
                board = BoardLogic.Normal();
            }

            return(View(board));
        }
Ejemplo n.º 2
0
        public IActionResult TestView()
        {
            int userid = 4;
            //int userid = io.GetLastUser();
            Board board = io.GetBoard(1);

            io.SaveBoard(board, userid);
            return(View("Views/TestView.cshtml", BigBoardLogic.Normal()));
        }
Ejemplo n.º 3
0
        public IActionResult BigBoardTest()
        {
            Board board = BigBoardLogic.Normal(); //there needs to be a function for bigBoard!

            return(View(board));
        }