Package net.traviangui.model

Examples of net.traviangui.model.Village


    // multiple times.
//    TagNode node = cleaner.clean( new File("tests/accept.html"));

    TagNode node = cleaner.clean( new File("tests/materias.html"));

    Village village = new Village();
        IOVillage.updateVillageOverview( village);
        System.out.println( village);


    Object[] myNodes;
View Full Code Here


        {
//            String[] data = Util.patternExtract( "\\?newdid=(\\d+)", domVillageUrls[i].toString(), 2);
//            int codD = Integer.parseInt( Util.patternExtract( "\\?newdid=(\\d+)", domVillageUrls[i].toString(), 1)[0]);

//            if( !villages.exists( id)) {
                Village v = new Village( );
                v.setName( domVillageNames[i].toString());
                v.setUrl( new URL( "http://s3.travian.net/" + domVillageUrls[i].toString()));
//                v.setId( id);
//              v.setCoordX( Integer.parseInt( domVillageCoordX[i].toString().replace( "(", "")));
//              v.setCoordY( Integer.parseInt( domVillageCoordY[i].toString().replace( ")", "")));
//              System.out.println( domVillageCoords[i].toString());

                Scanner s = new Scanner( domVillageCoords[i].toString());
                s.useDelimiter( "[ ()|\n\r\f\t]+");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");

//                String[] data = Util.patternExtract( "\\(([+\\-\\d]+)[^|]*.*|.*([+\\-\\d]+)\\)", domVillageCoords[i].toString(), 2);
//System.out.println( data[0]);
//System.out.println( data[1]);

                v.setCoordX( s.nextInt());
                v.setCoordY( s.nextInt());
               
                player.addVillage( v);
//            }
        }

View Full Code Here

        for( int i=0 ; i<domVillageNames.length ; i++)
        {
            int id = Integer.parseInt( Util.patternExtract( "\\?newdid=(\\d+)", domVillageUrls[i].toString(), 1)[0]);

            if( !villages.exists( id)) {
                Village v = new Village( );
                v.setName( domVillageNames[i].toString());
//              v.setUrl( new URL( domVillageUrls[i].toString()));
                v.setId( id);
//              v.setCoordX( Integer.parseInt( domVillageCoordX[i].toString().replace( "(", "")));
//              v.setCoordY( Integer.parseInt( domVillageCoordY[i].toString().replace( ")", "")));
//              System.out.println( domVillageCoords[i].toString());

                Scanner s = new Scanner( domVillageCoords[i].toString());
                s.useDelimiter( "[ ()|\n\r\f\t]+");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");
//              s.findInLine( "\\s*\\((\\d+)\\s*|\\s*(\\d+)\\)");

//                String[] data = Util.patternExtract( "\\(([+\\-\\d]+)[^|]*.*|.*([+\\-\\d]+)\\)", domVillageCoords[i].toString(), 2);
//System.out.println( data[0]);
//System.out.println( data[1]);

                v.setCoordX( s.nextInt());
                v.setCoordY( s.nextInt());
               
                villages.add( v);
            }
        }

View Full Code Here

TOP

Related Classes of net.traviangui.model.Village

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.