Package nz.ac.massey.softwarec.group3.login

Examples of nz.ac.massey.softwarec.group3.login.OpenId4Java


    public void setUp() {
       testing = new Game("group3scotlandyard@gmail.com", 1);
       players = new ArrayList<Player>();
       playing = false;
       mapXMLtest = "<?xml version='1.0' encoding='UTF-8'?> <map><intersections></intersections></map>";
       map = new Map(mapXMLtest);
       mrXMoves = new ArrayList<Move>();
       mapDevelopment = new MapDeveloper();
       mapNodes = mapDevelopment.developMap(mapXMLtest);
       mapJSONtest = map.createJSONString(mapNodes);
       mapst1 = new MapStation(0, 1.0, 1.0);
View Full Code Here


     */
    @Test
    public void testGetMap() {
        System.out.println("getMap & setMap");
        testing.setMap(map);
        Map expResult = map;
        Map result = testing.getMap();
        assertEquals(expResult, result);
    }
View Full Code Here

            game.setPlaying(true);
            game.startGame();
        }
        if ("setmap".equals(actionType)) {
            game = SessionListener.getSessionTracker().getGameTracker().createNewGame((String) session.getAttribute("email"));
            game.setMap(new Map(value));
            session.setAttribute("game", game);
        }
        if ("setmapname".equals(actionType)) {
            game.getMap().setMapName(value);
        }
View Full Code Here

       players = new ArrayList<Player>();
       playing = false;
       mapXMLtest = "<?xml version='1.0' encoding='UTF-8'?> <map><intersections></intersections></map>";
       map = new Map(mapXMLtest);
       mrXMoves = new ArrayList<Move>();
       mapDevelopment = new MapDeveloper();
       mapNodes = mapDevelopment.developMap(mapXMLtest);
       mapJSONtest = map.createJSONString(mapNodes);
       mapst1 = new MapStation(0, 1.0, 1.0);
       mapst2 = new MapStation(1, 2.0, 2.0);
       mapst3 = new MapStation(2, 3.0, 3.0);
View Full Code Here

    public void setUp() {
        player = new Player(1,2,3,true); //player in this case is Mr X.
        taxiTokens = 0;
        busTokens = 1;
        undergroundTokens = 2;
        currentLocation = new MapStation(1, 1.0, 1.0);
        ready = false;
    }
View Full Code Here

     */
    @Test
    public void getCurrentLocation() {
        System.out.println("getCurrentLocation & setCurrentLocation");
        player.setCurrentLocation(currentLocation);
        MapStation result = player.getCurrentLocation();
        assertEquals(currentLocation, result);
       
    }
View Full Code Here

       map = new Map(mapXMLtest);
       mrXMoves = new ArrayList<Move>();
       mapDevelopment = new MapDeveloper();
       mapNodes = mapDevelopment.developMap(mapXMLtest);
       mapJSONtest = map.createJSONString(mapNodes);
       mapst1 = new MapStation(0, 1.0, 1.0);
       mapst2 = new MapStation(1, 2.0, 2.0);
       mapst3 = new MapStation(2, 3.0, 3.0);
       mapst4 = new MapStation(1, 4.0, 4.0);
      
    }
View Full Code Here

     * @throws SAXException
     * @throws IOException
     */
    public void playerTakesTurn(final String value) throws ParserConfigurationException, SAXException, IOException{
        final Move move = createMove(value);
        final MapStation mapNode = map.getMapStation(move.getDestinationNode());
        if (!mrXLose(move)) {
            if ("TAXI".equals(move.getTicketType())) {
                players.get(whosTurn).useTaxiToken();
                players.get(whosTurn).setCurrentLocation(mapNode);
                if (!players.get(whosTurn).isMrX()) {
View Full Code Here

            messages.addFirst(new Message(text, userName));
            while (messages.size() > 10) {
                messages.removeLast();
            }
        }
        final ReverseAJAXCall call = new ReverseAJAXCall();
        final String messageJSON = "{ \"Name\" : \"" + userName + "\", \"Message\" : \"" + text + "\" }";
        call.createFilteredFunctionCall("/Software_Engineering_C/Resources/JavaServerPages/ingame.jsp", "Game", gameCreator, "addMessage", messageJSON);
    }
View Full Code Here

            messages.addFirst(new Message(text, userName));
            while (messages.size() > 10) {
                messages.removeLast();
            }
        }
        final ReverseAJAXCall call = new ReverseAJAXCall();
        final String messageJSON = "{ \"Name\" : \"" + userName + "\", \"Message\" : \"" + text + "\" }";
        call.createFunctionCall("/Software_Engineering_C/Resources/JavaServerPages/lobby.jsp", "addMessage", messageJSON);
    }
View Full Code Here

TOP

Related Classes of nz.ac.massey.softwarec.group3.login.OpenId4Java

Copyright © 2018 www.massapicom. 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.