while(alive){ me.eat(); me.code(); me.sleep(); } if(!goodboy) mePtr = new hell; else mePtr = new heaven; return 0;