/************************************************************************************
MRailSim - a model railway simulation program - http://mrailsim.sourceforge.net/
Copyright (C) 2004,2007 Bernd Arnold
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
************************************************************************************/
package net.sf.mrailsim.tests;
import net.sf.mrailsim.main.Game;
import net.sf.mrailsim.main.Program;
import net.sf.mrailsim.trains.Train;
public class Test_01 {
/**
* @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();
}
}