Exemplo n.º 1
0
 public void Save(Party party)
 {
     using (var gameDB = new GameContext())
     {
         gameDB.Party.Add(party);
         gameDB.SaveChanges();
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            GameController gameController = new GameController();
            Console.Clear();
            Guid partyGuid = Guid.NewGuid();
            Party party = new Party(partyGuid, "A-Team " + partyGuid);
            party.AddCharacter(new Fighter(Guid.NewGuid(), "Martigan"));
            DisplayCharacter(party.Characters[0]);
            Console.WriteLine();
            Console.WriteLine(gameController.Look());
            Console.WriteLine();
            string command;

            while (true)
            {
                Console.Write("> ");
                command = Console.ReadLine();
                Console.WriteLine(gameController.Go(command));
            }
        }