Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

♀ /prog/ Challenge Vol. 8 ♀

Name: Anonymous 2010-06-29 14:04

The Challenge:
-Develop a turn based combat system that implements the following choices that occur during the player's turns:
--Fight (Straight Damage)
--Item (Use an object from a choice of your design)
--Ability (Use an ability from a choice of your design)
--Run (Flee the battle)


The Deadline:
- 2010-07-01 00:00

The rest is up to you.

Name: Anonymous 2010-07-02 14:07

>>74
In Python 3, and 2.x with the future feature imported, print is a function. Get used to it.

The other paren is stylistic, I find it's way too easy to write something like
print("blah %d blah blah" % x)
and then later adapt the line to add y, forgetting to make the RHS value a tuple:
print("blah %d blah %d blah" % x, y)
Which of course doesn't work. This is especially bad if your first value is a tuple and you're using %r or %s to print a tuple, because then you won't even get an error message, it'll just work -- incorrectly. Better off putting that extra set of parentheses around your values every time you %-substitute.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List