Package org.ggp.base.util.match

Examples of org.ggp.base.util.match.Match.toJSON()


        } else if (event instanceof ServerCompletedMatchEvent) {
              System.out.println("State[" + nState[0] + "] Full (Terminal): " + oldContents);
              System.out.println("Match information: " + theMatch);
              System.out.println("Goals: " + ((ServerCompletedMatchEvent)event).getGoals());
              try {
                System.out.println("Match information cryptographically signed? " + SignableJSON.isSignedJSON(new JSONObject(theMatch.toJSON())));
                System.out.println("Match information cryptographic signature valid? " + SignableJSON.verifySignedJSON(new JSONObject(theMatch.toJSON())));
              } catch (JSONException je) {
                je.printStackTrace();
              }
              System.out.println("Game over.");
View Full Code Here


              System.out.println("State[" + nState[0] + "] Full (Terminal): " + oldContents);
              System.out.println("Match information: " + theMatch);
              System.out.println("Goals: " + ((ServerCompletedMatchEvent)event).getGoals());
              try {
                System.out.println("Match information cryptographically signed? " + SignableJSON.isSignedJSON(new JSONObject(theMatch.toJSON())));
                System.out.println("Match information cryptographic signature valid? " + SignableJSON.verifySignedJSON(new JSONObject(theMatch.toJSON())));
              } catch (JSONException je) {
                je.printStackTrace();
              }
              System.out.println("Game over.");
        }
View Full Code Here

    // Open up the JSON file for this match, and save the match there.
    f = new File(tourneyName + "/" + matchName + ".json");
    if (f.exists()) f.delete();
    bw = new BufferedWriter(new FileWriter(f));
    bw.write(match.toJSON());
    bw.flush();
    bw.close();

    // Save the goals in the "/scores" file for the tournament.
    bw = new BufferedWriter(new FileWriter(tourneyName + "/scores", true));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.