Beispiel #1
0
        public Field GetEmptyField(int x, int y, bool isBordered)
        {
            Field field;

            if (isBordered == true)
            {
                field = new BorderedField(x, y);
            }
            else
            {
                field = new LoopbackField(x, y);
            }
            return(field);
        }
Beispiel #2
0
        public ActionResult AddField(int x, int y, bool flagBordered)
        {
            Field myField;

            if (flagBordered == true)
            {
                myField = new BorderedField(x, y);
            }
            else
            {
                myField = new LoopbackField(x, y);
            }
            Session["mySession"] = myField;
            return(RedirectToAction("Game", "Life"));
        }