@ Override public void die ( String reason ) { log . info ( "[die] Robot {} died with reason: {}" , serialNumber , reason ) ; if ( alive ) { // if not alive it means it was killed at creation alive = false ; interrupted = true ; // to speed up death world . remove ( Robot . this ) ; } }
Kills the robot and removes it from the board