Ejemplo n.º 1
0
        private APIMsgConclusion handleMakeClientMove(JSONObject jObj)
        {
            Connect4Command command = new Connect4Command();

            command.move = (int)jObj.GetField(Consts.Fields.move).i;
            return(APIGameLogic.makeClientMove(command));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
        private APIMsgConclusion handleEvalBoard(JSONObject jObj)
        {
            Connect4Command command = parseAPICommand(jObj, Consts.Actions.evalBoard);

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

            return(APIGameLogic.aquirePossibleMoves(command));
        }