Il 11 dicembre 2011 09:41, Daniele Zambelli <daniele.zambe...@gmail.com> ha scritto: > > Per quanto riguarda la riga 17, l'espressione: > > (key==KEY_RIGHT and 1 or key==KEY_LEFT and -1) > > restituisce 1 o -1 a seconda del tasto premuto. [...] >> > Quindi l'intera riga 17: > > snake.insert(0,[snake[0][0]+(key==KEY_RIGHT and 1 or key==KEY_LEFT and -1), > snake[0][1]+(key==KEY_DOWN and 1 or > key==KEY_UP and -1)]) > > aggiunge come primo elemento della lista snake un elemento uguale al > precedente ma con i valori incrementati o decrementati di uno in base > al tasto premuto.
Grazie _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python