[SOLVED] 代写代考 package dungeonmania.goals;

30 $

package dungeonmania.goals;

import org.json.JSONArray;
import org.json.JSONObject;

Copyright By PowCoder代写加微信 powcoder

public class GoalFactory {
public static Goal createGoal(JSONObject jsonGoal, JSONObject config) {
JSONArray subgoals;
switch (jsonGoal.getString(“goal”)) {
case “AND”:
subgoals = jsonGoal.getJSONArray(“subgoals”);
return new Goal(
createGoal(subgoals.getJSONObject(0), config),
createGoal(subgoals.getJSONObject(1), config)
case “OR”:
subgoals = jsonGoal.getJSONArray(“subgoals”);
return new Goal(
createGoal(subgoals.getJSONObject(0), config),
createGoal(subgoals.getJSONObject(1), config)
case “exit”:
return new Goal(“exit”);
case “boulders”:
return new Goal(“boulders”);
case “treasure”:
int treasureGoal = config.optInt(“treasure_goal”, 1);
return new Goal(“treasure”, treasureGoal);
return null;

程序代写 CS代考加微信: powcoder QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写代考 package dungeonmania.goals;
30 $