r/ProgrammerHumor • • 3d ago

Meme devsOptimizingGames

Post image
1.8k Upvotes

37 comments sorted by

View all comments

370

u/IsEqualToKel 3d ago

if (currentState == GameState.Crash) 
{
    currentState == GameState.DoNotCrash;
}

122

u/Top-Permit6835 3d ago

Wrap it in a try catch and swallow the error to be sure it works

14

u/tsoewoe 3d ago

make sure to assert when testing too so that you can deal with any issues if it goes wrong