コード例 #1
0
        public static void Main(string[] args)
        {
            IDataReader dataRead = new ConsoleDataReader();
            IDataWriter dataWrite = new ConsoleDataWriter();
            string secret;
            GuessMarker marker;

            if (args != null && args.Length > 0)
            {
                secret = args[0];
                marker = new GuessMarker(dataRead, dataWrite, secret);
            }
            else
            {
                marker = new GuessMarker(dataRead, dataWrite, new RandomSecret());
            }

            marker.start();
            while (true)
            {
                marker.Step();
            }
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            IDataReader dataRead  = new ConsoleDataReader();
            IDataWriter dataWrite = new ConsoleDataWriter();
            string      secret;
            GuessMarker marker;

            if (args != null && args.Length > 0)
            {
                secret = args[0];
                marker = new GuessMarker(dataRead, dataWrite, secret);
            }
            else
            {
                marker = new GuessMarker(dataRead, dataWrite, new RandomSecret());
            }

            marker.start();
            while (true)
            {
                marker.Step();
            }
        }