ThePythonGameBook

learn Python. Create Games

User Tools

Site Tools


en:python:goblins:step002

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:python:goblins:step002 [2013/07/07 18:59]
Horst JENS [002]
en:python:goblins:step002 [2017/09/03 16:21] (current)
Horst JENS
Line 1: Line 1:
-===== 002 ===== +===== 002 values ​===== 
-| [[step001|←]] | This is step002. ​[[start|↑]] | [[step003|→]] | +| [[step001|←]] ​ step 002 [[start|↑]] ​  [[step003|→]] ​ 
-===== Variables =====+ 
 +[<>]
  
 === changing variables === === changing variables ===
Line 20: Line 21:
 In both cases, the python interpreter will first calculate the right side of the equation (hitpointsGrunty - 1) and assign the result to the variable on the left side of the equation....hitpointsGrunty. The old value of the variable is overwritten. In both cases, the python interpreter will first calculate the right side of the equation (hitpointsGrunty - 1) and assign the result to the variable on the left side of the equation....hitpointsGrunty. The old value of the variable is overwritten.
  
 +=== source code ===
 +//click reload on your browser if you see no source code here or visit [[https://​github.com/​horstjens/​ThePythonGameBook/​blob/​master/​python/​goblins/​slowgoblins002.py|Github.com]] //
 +<​html><​script src="​http://​gist-it.appspot.com/​github/​horstjens/​ThePythonGameBook/​blob/​master/​python/​goblins/​slowgoblins002.py?​footer=minimal"></​script></​html>​
 +
 +
 +=== test ===
 Tricky question: How many hitpoints has Grunty left now ? Tricky question: How many hitpoints has Grunty left now ?
  
Line 43: Line 50:
 </​code>​ </​code>​
  
-next: [[step003]]+| [[step001|←]] ​ | step 002 [[start|↑]] ​ |  ​[[step003|→]]  |
/var/www/horst/thepythongamebook.com/data/attic/en/python/goblins/step002.1373216361.txt.gz · Last modified: 2014/01/09 11:07 (external edit)