Ok, sorry for the poor question, but I couldn't think of a way to summarize this into one sentence. So I'm making a version of Snake, and I need to make sure that my snake can never move backward, otherwise his head touches his body and it's game over. So one way (the only way) I've thought of is to set these variables inside my snake class: