added win condition and stationary flag which can be rescued in the middle of the map and some bug fixes