Package net.sf.mrailsim.main

Examples of net.sf.mrailsim.main.Program


  /**
   * @param args
   */
  public static void main(String[] args) {
   
    Program pgm = new Program();
    pgm.start();
   
//    pgm.loadConfigFromFile( "config/test_01_simplecircle.txt" );
//    pgm.loadConfigFromFile( "config/test_02_passingplace.txt" );
//    pgm.loadConfigFromFile( "config/test_02_passingplace_signals.txt" );
//    pgm.loadConfigFromFile( "config/test_02_passingplace_error.txt" );
    pgm.loadConfigFromFile( "config/test_03_mapgenerator.txt" );

    System.out.println(  );
//    Game.trackManager.printWayFrom( Game.trackManager.getTrack( 1 ), Game.nodeManager.getNode( 1 ), 7 );
    System.out.println(  );

    Train t1 = new Train( 1, 20 );
   
    Game.trainManager.add( t1 );
    Game.trainManager.putTrain( t1, 1, 59 );
   
    Train t2 = new Train( 2, 20 );
   
    Game.trainManager.add( t2 );
    Game.trainManager.putTrain( t2, 72, 351 );

    // TODO: This will only work with example config file #3
    Program.addTrainWatcherWindow( 1 );
    Program.addTrainWatcherWindow( 2 );
    Program.addSignalWatcherWindow( 50001 );
   
    pgm.startGame();
  }
View Full Code Here

TOP

Related Classes of net.sf.mrailsim.main.Program

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.