00001 #include "Singleton.h" 00002 #include "BombedMazeFactory.h" 00003 00004 #include "string.h" 00005 00006 class MazeFactory * factoryInstance; 00007 00008 //ik added bombed_ parameter: 00009 class MazeFactory * FactoryInstance( bool bombed_ ) { 00010 int i = 0; 00011 00012 if(factoryInstance == 0) { 00013 if ( bombed_ ) { 00014 factoryInstance = new BombedMazeFactory(); 00015 } else { 00016 factoryInstance = new MazeFactory();; 00017 } 00018 } 00019 return factoryInstance; 00020 } 00021 00022 class MazeFactory * FactoryInstance() { 00023 return FactoryInstance( false ); 00024 } 00025