Esempio n. 1
0
        public void Initialize()
        {
            string text = System.IO.File.ReadAllText(@"TestConfig.txt");

            Settings = JsonConvert.DeserializeObject <PickAndPlaySettings>(text);
            Service  = new PickAndPlayService(Settings);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string text = System.IO.File.ReadAllText(@"Config.txt");
            PickAndPlaySettings settings = JsonConvert.DeserializeObject <PickAndPlaySettings>(text);
            PickAndPlayService  service  = new PickAndPlayService(settings);
            string ply;

            while (true)
            {
                try
                {
                    ply = console.ReadLine();
                    service.IssueMove(ply);
                }
                catch
                {
                    console.WriteLine("I'm sorry, your move could not be completed as entered.");
                }
            }
        }