Nauč se Python > Materiály > Snake Workshop for PyLadies > The Snake > Game logic

Game logic – Řešení [7]

  • "Initial attribute setting" to the initialize method.
  • "Stopping the snake" instead of all occurrences of raise("Game Over").
  • "Preventing movement" at the very beginning of the move method (the return statement will immediately terminate the execution of the method).
  • "Graphic indication" after the section for selecting the image for the snake piece.

Toto je stránka lekce z kurzu, který probíhá nebo proběhl naživo s instruktorem.