コード例 #1
0
        public async Task StartAsync()
        {
            int k = await FileBoundary.GetKAsync();

            int[,] visibility = await FileBoundary.ReadVisibilityMatrixAsync();

            int[,] communications = await FileBoundary.ReadCommunicationsMatrixAsync();

            var solver = new CspSolver(k, visibility, communications);
            var result = solver.Solve();
            await FileBoundary.WriteBackResultAsync(result);
        }
コード例 #2
0
        public async Task ReadKMustWork()
        {
            var k = await FileBoundary.GetKAsync();

            Assert.AreEqual(k, 2);
        }