Examples of MapStation


Examples of nz.ac.massey.softwarec.group3.game.map.MapStation

    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

Examples of nz.ac.massey.softwarec.group3.game.map.MapStation

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

Examples of nz.ac.massey.softwarec.group3.game.map.MapStation

       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

Examples of nz.ac.massey.softwarec.group3.game.map.MapStation

     * @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
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.