Example #1
0
        public GameViewModel GetStartUpVals(GameViewModel model)
        {
            DataLayer.Game.Opponents Opponents = new DataLayer.Game.Opponents();
            List<tblPlayerType> tblPlayerTypes = Opponents.GetOpponents();

            DataLayer.Game.Match Match = new Match();
            List<tblLookupMoveType> MovesTypes = Match.GetStandardMoveSet();

            foreach (var opponent in tblPlayerTypes)
            {
                SelectListItem l = new SelectListItem();
                l.Text = opponent.PlayerType;
                l.Value = opponent.PlayerType;
                //l.Value = opponent.PlayerTypeId.ToString();
                model.OpponentsList.Add(l);
            }

            foreach (var move in MovesTypes)
            {
                SelectListItem l = new SelectListItem();
                l.Text = move.MoveTypeName;
                l.Value = move.MoveTypeName;
                //l.Value = move.MoveTypeId.ToString();
                model.MoveSetList.Add(l);
            }

            model.CurrentRound = 1;
            return model;
        }
Example #2
0
 public Dictionary<Guid, bool> InitMatch(string numOfRounds)
 {
     DataLayer.Game.Match Match = new Match();
     return Match.CreateMatchId(numOfRounds);
 }