public void Initialize() { string text = System.IO.File.ReadAllText(@"TestConfig.txt"); Settings = JsonConvert.DeserializeObject <PickAndPlaySettings>(text); Service = new PickAndPlayService(Settings); }
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."); } } }