Beispiel #1
0
        SPlayerResponse solve(SRequest request)
        {
            Console.WriteLine("Request " + request.requestQuestion);
            int answer;

            while (!int.TryParse(Console.ReadLine(), out answer))
            {
                ;
            }
            return(new SPlayerResponse(answer));
        }
Beispiel #2
0
        public SPlayerResponse solve(SRequest request, SLogger logger)
        {
            // wherever one of players should make a descision
            // you flush to all players all new info/
            // and show them, that player is thinking
            foreach (int player in _players.Keys)
            {
                _players[player].recieve(logger.flush(player));
            }

            return(_players[request.adresser].response(request));
        }
Beispiel #3
0
        public SPlayerResponse response(SRequest request)
        {
            SPlayerResponse response = request.autoResponce;

            return(response != null? response : solve(request));
        }