public boolean isCR_OK(Participant p) { mgc = (MazeGameController2WAY) this.getC().getTaskController(); if (this.interventionEARLY && mgc.getMazeNo() > 5) { // ////// Conversation.printWSln("Main3", "ISCROKABORTED(0)"); return false; } else if (!this.interventionEARLY && mgc.getMazeNo() < 6) { // ////// Conversation.printWSln("Main3", "ISCROKABORTED(0)"); return false; } possCR = pf.getAClarificationFastest(this.mostRecentTextCONTIG); // ////////mostRecentText Conversation.printWSln("Main3", this.mostRecentTextCONTIG); Conversation.printWSln("Main3", possCR); Conversation.printWSln("Main3", "---------------"); if (possCR == null) { Conversation.printWSln("Main3", "ISCROKABORTED(1)"); return false; } if (possCR.length() == 0) { Conversation.printWSln("Main3", "ISCROKABORTED(2)"); return false; } if (this.blockALLCR) { Conversation.printWSln("Main3", "ISCROKABORTED(3)"); return false; } Conversation.printWSln("Main", showSummary()); int currentTraversalCount = mgc.getSwitchTraversalCount(p.getUsername()) + mgc.getMazeNo(); // To be able to generate intervention at beginning of each game Integer oldTraversalCount = (Integer) this.htLastTraversalCount.get(p); if (oldTraversalCount == null) { return true; } if (oldTraversalCount >= currentTraversalCount) return false; int idx = this.getC().getParticipants().getAllParticipants().indexOf(p); if (idx == 0) { if (this.participant1mazeInterventions[mgc.getMazeNo()] >= maxInterventionsPerMaze.getValue()) { Conversation.printWSln( "Main", "ISCROKABORTED(5A) " + participant1mazeInterventions[mgc.getMazeNo()] + "..." + maxInterventionsPerMaze.getValue()); return false; } // Conversation.printWSln("Main","Can perform intervention participant 1: "+ // participant1mazeInterventions[mgc.getMazeNo()]+"--"+maxInterventionsPerMaze.getValue()); return true; } else if (idx == 1) { if (this.participant2mazeInterventions[mgc.getMazeNo()] >= maxInterventionsPerMaze.getValue()) { Conversation.printWSln( "Main", "ISCROKABORTED(5B) " + participant2mazeInterventions[mgc.getMazeNo()] + "..." + maxInterventionsPerMaze.getValue()); return false; } // Conversation.printWSln("Main","Can perform intervention participant 2: "+ // participant2mazeInterventions[mgc.getMazeNo()]+"--"+maxInterventionsPerMaze.getValue()); return true; } Conversation.printWSln("Main", "QUITE A BAD ERROR...." + p.getUsername()); return true; }
public void reload() { pf.loadRawPhrases(); }