code of architecture simulator and fire detection