Skip to main content
if self.direction == "left":
    self.expand_snake(-w, 0):
elif self.direction == "down":
    self.expand_snake(0, w):
elif self.direction == "right":
    self.expand_snake(w, 0):
elif self.direction == "up":
    self.expand_snake(0, -w):
if self.direction == "left":
    self.expand_snake(-w, 0):
elif self.direction == "down":
    self.expand_snake(0, w):
elif self.direction == "right":
    self.expand_snake(w, 0):
elif self.direction == "up":
    self.expand_snake(0 -w):
if self.direction == "left":
    self.expand_snake(-w, 0):
elif self.direction == "down":
    self.expand_snake(0, w):
elif self.direction == "right":
    self.expand_snake(w, 0):
elif self.direction == "up":
    self.expand_snake(0, -w):
Commonmark migration
Source Link

duplicated code

##duplicated code AnyAny time you see code that does essentially the same thing you should consider re-writing it. Python is highly amenable to the don't-repeat-yourself idea so keep that in mind.

##duplicated code Any time you see code that does essentially the same thing you should consider re-writing it. Python is highly amenable to the don't-repeat-yourself idea so keep that in mind.

duplicated code

Any time you see code that does essentially the same thing you should consider re-writing it. Python is highly amenable to the don't-repeat-yourself idea so keep that in mind.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

"magic variables""magic variables" are often less clear than explicit named variables.

"magic variables" are often less clear than explicit named variables.

"magic variables" are often less clear than explicit named variables.

replaced http://meta.codereview.stackexchange.com/ with https://codereview.meta.stackexchange.com/
Source Link
Loading
Cleaned up answer
Source Link
shuttle87
  • 2k
  • 13
  • 19
Loading
added 63 characters in body
Source Link
shuttle87
  • 2k
  • 13
  • 19
Loading
Source Link
shuttle87
  • 2k
  • 13
  • 19
Loading