示例#1
0
        private APIMsgConclusion handleMakeClientMove(JSONObject jObj)
        {
            Connect4Command command = new Connect4Command();

            command.move = (int)jObj.GetField(Consts.Fields.move).i;
            return(APIGameLogic.makeClientMove(command));
        }
示例#2
0
        private APIMsgConclusion handleSimulateMove(JSONObject jObj)
        {
            Connect4Command command = parseAPICommand(jObj, Consts.Actions.simMove);

            command.player           = (int)jObj.GetField(Consts.Fields.player).i;
            command.getPossibleMoves = jObj.HasField(Consts.Fields.possibleMoves);
            command.move             = (int)jObj.GetField(Consts.Fields.move).i;

            return(APIGameLogic.simulateMove(command));
        }
示例#3
0
        private APIMsgConclusion handleEvalBoard(JSONObject jObj)
        {
            Connect4Command command = parseAPICommand(jObj, Consts.Actions.evalBoard);

            return(APIGameLogic.evaluateBoard(command));
        }
示例#4
0
        private APIMsgConclusion handleGetPossibleMoves(JSONObject jObj)
        {
            Connect4Command command = parseAPICommand(jObj, Consts.Actions.simMove);

            return(APIGameLogic.aquirePossibleMoves(command));
        }