Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-17 Thread Jason Friedman
> if you're interested in learning Python and/or game programming in
> Python, you might want to take a look at http://inventwithpython.com/

And https://www.coursera.org/course/interactivepython.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-17 Thread darnold
On Dec 16, 12:38 pm, tbg  wrote:
> Nice, will have to try it out...

if you're interested in learning Python and/or game programming in
Python, you might want to take a look at http://inventwithpython.com/
.

HTH,
Don
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pastebin [was: Trying to make a basic Python score counter in a game... will not count.]

2012-12-17 Thread Chris Angelico
On Mon, Dec 17, 2012 at 5:47 PM, Steven D'Aprano
 wrote:
> On Mon, 17 Dec 2012 07:13:44 +1100, Chris Angelico wrote:
>> I don't understand the idea behind the boycott. Are people worried about
>> the longevity of linked-to content, in the event that pastebin should,
>> as you say, cease to exist tomorrow? Or is it that some won't click a
>> pastebin link in case it's abusive? This isn't the sort of abuse that
>> can compromise your computer.
>
> How do you know? Between javascript and flash, just about any browser
> could be vulnerable to just about any website. You might implicitly trust
> Pastebin, but you can't possibly *know* that the site won't do bad
> things. It wouldn't be the first time that even a reputable website got
> hacked by somebody who used it to deploy malware.

Sure, anything can be compromised. But demonstrations that Pastebin
has been used to disseminate illegal information have nothing to do
with that. However...

> But that's not why I dislike Pastebin. I argue against Pastebin because:
>
> 1) Longevity of the content. Your question is going to be around for
> much, much longer than your pastebin. People searching for help will
> click through to the pastebin and find the code is gone. It is really
> frustrating to (say) search for the solution to a problem, and find that
> the answer is given in an expired pastebin.

... ah, that's a much more serious issue. When do they expire? I
didn't find it on the site. Some of the others expire after a VERY
short time (weeks, or even hours), making them completely
inappropriate for this sort of thing. It really needs to be indefinite
duration.

> 2) When you ask for help via email, you shouldn't assume that the people
> reading have access to the web. Perhaps they have email access, but all
> or part of the web is blocked to them. Perhaps they are reading email on
> a mobile device and don't mind paying to download a couple of KB of
> email, but draw the line at (potentially) hundreds of KB of a web page
> plus associated images, unnecessary javascript, web bugs, advertisements,
> etc. Or maybe they just don't want the context switch:
>
> "I'm reading email right now, I'll click the link later..."
>
> Email is a push technology. A pastebin is a pull technology. Whenever you
> require your audience to actively go and get content, you're cutting your
> audience by some fraction.

Yes, I agree. And I'll go further: I don't like having to download an
attached file. Put your code inline; if it's too long for that, it's
probably too long to be asking about.

There are exceptions, of course, but if I'm going to go fetch
components from elsewhere, I have to have already been drawn into the
thread with strong interest. It's a steep hill to climb.

> "Why should I
> have to go out of my way to find out what your question is? You're asking
> me to do you a favour, and you're making me work to find out what the
> favour is???"

Can't argue with that! I agree, other than that I don't swear. :)

> I'm not saying "never use a paste bin". I think it probably makes lots of
> sense to use one in IRC, where it is inappropriate to paste more than a
> line or two of code at once, and the conversation is already ephemeral.
> But in a Usenet or email forum, I think it is almost always inappropriate
> to use paste bins. If your code is too large to paste directly in the
> body of your email, chances are it is too large to expect people to debug
> for you. But you can try adding it as an attachment (.py, not .doc), and
> only if you can't do that for some reason, then maybe a paste bin is
> appropriate.

Yeah, it's good for a MUD too. We use URL shorteners and such, and
aren't too concerned that tinyurl.com might not exist in a few years
(though it is better to use ones that don't expire URLs). But really,
when you're asking for Python help, you shouldn't need to blat tens of
kay of code at us all. It should be possible to put it in-line.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pastebin [was: Trying to make a basic Python score counter in a game... will not count.]

2012-12-16 Thread Steven D'Aprano
On Mon, 17 Dec 2012 07:13:44 +1100, Chris Angelico wrote:

> On Mon, Dec 17, 2012 at 5:35 AM, Ian Kelly 
> wrote:
>> On Sun, Dec 16, 2012 at 10:32 AM, Kwpolska  wrote:
>>> On Sun, Dec 16, 2012 at 6:25 PM,   wrote:
 On Sunday, December 16, 2012 10:09:53 AM UTC-7, Kwpolska wrote:
>[...]
> PS. please do not use pastebin.com.

 Why?
[...]
> I don't understand the idea behind the boycott. Are people worried about
> the longevity of linked-to content, in the event that pastebin should,
> as you say, cease to exist tomorrow? Or is it that some won't click a
> pastebin link in case it's abusive? This isn't the sort of abuse that
> can compromise your computer.

How do you know? Between javascript and flash, just about any browser 
could be vulnerable to just about any website. You might implicitly trust 
Pastebin, but you can't possibly *know* that the site won't do bad 
things. It wouldn't be the first time that even a reputable website got 
hacked by somebody who used it to deploy malware.

But that's not why I dislike Pastebin. I argue against Pastebin because:

1) Longevity of the content. Your question is going to be around for 
much, much longer than your pastebin. People searching for help will 
click through to the pastebin and find the code is gone. It is really 
frustrating to (say) search for the solution to a problem, and find that 
the answer is given in an expired pastebin.


2) When you ask for help via email, you shouldn't assume that the people 
reading have access to the web. Perhaps they have email access, but all 
or part of the web is blocked to them. Perhaps they are reading email on 
a mobile device and don't mind paying to download a couple of KB of 
email, but draw the line at (potentially) hundreds of KB of a web page 
plus associated images, unnecessary javascript, web bugs, advertisements, 
etc. Or maybe they just don't want the context switch:

"I'm reading email right now, I'll click the link later..."

Email is a push technology. A pastebin is a pull technology. Whenever you 
require your audience to actively go and get content, you're cutting your 
audience by some fraction.

I am aware that it is irrational and silly, but for me it also has to do 
with a sense of fairness. I'm prepared to spend tens of minutes, or 
sometimes even an hour or more, solving somebody else's problem for no 
benefit except a sense of accomplishment. But ask me to click on a 
pastebin to find out what that question is, and I'm all "Why should I 
have to go out of my way to find out what your question is? You're asking 
me to do you a favour, and you're making me work to find out what the 
favour is??? Fuck you!"

But maybe that's just me :-)

I'm not saying "never use a paste bin". I think it probably makes lots of 
sense to use one in IRC, where it is inappropriate to paste more than a 
line or two of code at once, and the conversation is already ephemeral. 
But in a Usenet or email forum, I think it is almost always inappropriate 
to use paste bins. If your code is too large to paste directly in the 
body of your email, chances are it is too large to expect people to debug 
for you. But you can try adding it as an attachment (.py, not .doc), and 
only if you can't do that for some reason, then maybe a paste bin is 
appropriate.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Mitya Sirenef

On 12/16/2012 01:07 PM, Mitya Sirenef wrote:

On 12/16/2012 12:00 PM, Darrien  Glasser wrote:
>> Hey guys, I'm working on a Python rock paper scissors (lizard spock) 
game, and the beginning is
> complete. After I finished it, I thought, "You know what? I think I 
can make this even better, and add a score counter." And so I did.

> >
> > The problem is that it doesn't seem to actually keep track of 
score. In fact it always keeps the score at 0 for both players. It's 
fully functional otherwise, but it's bothering me that I can't get it to 
work.

> >
> > Currently using Windows Python 32 bit v2.6.8
> >
> > Download of the code here:
> >
> > https://www.box.com/s/2lupxeyk5jvsxs0zkdfb
> >
> > Copy of the code here:
> >
> > http://pastebin.com/MNdgiuSY
> >
> > Thanks in advance for your help...
>
>
> I was actually thinking of making a simple rock paper scissors game so I
> went ahead and cobbled it together, using a design with a class and
> generally a structured approach.. It keeps the scores, too, and you can
> set both players to be AI, or one to be AI, or both to be humans:
>
> https://github.com/pythonbyexample/PBE/blob/master/code/rockpaper.py
>
> (it needs python3 but can be easily changed to work with python2.x)
>
>
> - mitya
>


If anyone's interested, I've simplified the code further by making use
of my TextInput utility class; I've also made the game into a tutorial,
it can be found here:

http://lightbird.net/larks/rockpaper.html


The updated full code is really tiny (it requires utils.py which is
linked at the top of tutorial):


import sys
from random import choice as randchoice
from time import sleep

from utils import TextInput

players= 'XY'
ai_players = 'Y'
moves  = "rps"
wins   = ("rp", "sr", "ps")   # choice on the right side wins
status = "%5s %3d %5s %3d moves: %s %s"
pause_time = 0.3


class RockPaperScissors(object):
def run(self):
self.textinput = TextInput("(r|p|s)")
scores = [0, 0]

while True:
choice1, choice2 = (self.get_move(p) for p in players)

if choice1 != choice2:
winplayer = 1 if (choice1+choice2 in wins) else 0
scores[winplayer] += 1

print(status % (players[0], scores[0], players[1], 
scores[1], choice1, choice2))

sleep(pause_time)

def get_move(self, player):
if player in ai_players : return randchoice(moves)
else: return self.textinput.getval()


if __name__ == "__main__":
try  : RockPaperScissors().run()
except KeyboardInterrupt : pass


--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread alex23
On Dec 17, 3:32 am, Kwpolska  wrote:
> >> PS. please do not use pastebin.com.
> http://news.ycombinator.com/item?id=2595066should answer this very question.

By that argument, you should also be asking people not to use the
internet.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pastebin [was: Trying to make a basic Python score counter in a game... will not count.]

2012-12-16 Thread Chris Angelico
On Mon, Dec 17, 2012 at 5:35 AM, Ian Kelly  wrote:
> On Sun, Dec 16, 2012 at 10:32 AM, Kwpolska  wrote:
>> On Sun, Dec 16, 2012 at 6:25 PM,   wrote:
>>> On Sunday, December 16, 2012 10:09:53 AM UTC-7, Kwpolska wrote:
[...]
 PS. please do not use pastebin.com.
>>>
>>> Why?
>>
>> http://news.ycombinator.com/item?id=2595066 should answer this very question.
>
> That seems to be a problem with a certain class of users that have
> adopted Pastebin, not a problem with the site itself.  What do you
> hope to accomplish by boycotting Pastebin for actual code pastes?
> Even if the site were to cease to exist tomorrow, what is to stop the
> hackers from simply switching to dpaste or gist like everybody else?

The comment by genbattle in the above link is an important one, I
think. The last time I used pastebin was for Pike code - does any
competing site have Pike support?

http://pastebin.com/UNTj642Y

I don't understand the idea behind the boycott. Are people worried
about the longevity of linked-to content, in the event that pastebin
should, as you say, cease to exist tomorrow? Or is it that some won't
click a pastebin link in case it's abusive? This isn't the sort of
abuse that can compromise your computer.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread tbg
Nice, will have to try it out...
-- 
http://mail.python.org/mailman/listinfo/python-list


Pastebin [was: Trying to make a basic Python score counter in a game... will not count.]

2012-12-16 Thread Ian Kelly
On Sun, Dec 16, 2012 at 10:32 AM, Kwpolska  wrote:
> On Sun, Dec 16, 2012 at 6:25 PM,   wrote:
>> On Sunday, December 16, 2012 10:09:53 AM UTC-7, Kwpolska wrote:
>>>[...]
>>> PS. please do not use pastebin.com.
>>
>> Why?
>
> http://news.ycombinator.com/item?id=2595066 should answer this very question.

That seems to be a problem with a certain class of users that have
adopted Pastebin, not a problem with the site itself.  What do you
hope to accomplish by boycotting Pastebin for actual code pastes?
Even if the site were to cease to exist tomorrow, what is to stop the
hackers from simply switching to dpaste or gist like everybody else?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Mitya Sirenef

On 12/16/2012 01:17 PM, tbg wrote:

On Sunday, December 16, 2012 1:07:16 PM UTC-5, Mitya Sirenef wrote:

On 12/16/2012 12:00 PM, Darrien Glasser wrote:


Hey guys, I'm working on a  Python rock paper scissors (lizard spock) game, and 
the beginning is

complete. After I finished it, I thought, "You know what? I think I can

make this even better, and add a score counter." And so I did.

  >

  > The problem is that it doesn't seem to actually keep track of score.

In fact it always keeps the score at 0 for both players. It's fully

functional otherwise, but it's bothering me that I can't get it to work.

  >

  > Currently using Windows Python 32 bit v2.6.8

  >

  > Download of the code here:

  >

  > https://www.box.com/s/2lupxeyk5jvsxs0zkdfb

  >

  > Copy of the code here:

  >

  > http://pastebin.com/MNdgiuSY

  >

  > Thanks in advance for your help...





I was actually thinking of making a simple rock paper scissors game so I

went ahead and cobbled it together, using a design with a class and

generally a structured approach.. It keeps the scores, too, and you can

set both players to be AI, or one to be AI, or both to be humans:



https://github.com/pythonbyexample/PBE/blob/master/code/rockpaper.py



(it needs python3 but can be easily changed to work with python2.x)





   - mitya



--

Lark's Tongue Guide to Python: http://lightbird.net/larks/

Well there goes my hopes and dreams of being the first one to do that. Nice job 
by the way.


Well you were the first :-)  I just did it to illustrate a modular 
approach, I think a

simple game like that is a great learning opportunity.

I posted an update with some small cleanups just now..

--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread tbg
On Sunday, December 16, 2012 1:07:16 PM UTC-5, Mitya Sirenef wrote:
> On 12/16/2012 12:00 PM, Darrien Glasser wrote:
> 
> > Hey guys, I'm working on a  Python rock paper scissors (lizard spock) game, 
> > and the beginning is 
> 
> complete. After I finished it, I thought, "You know what? I think I can 
> 
> make this even better, and add a score counter." And so I did.
> 
>  >
> 
>  > The problem is that it doesn't seem to actually keep track of score. 
> 
> In fact it always keeps the score at 0 for both players. It's fully 
> 
> functional otherwise, but it's bothering me that I can't get it to work.
> 
>  >
> 
>  > Currently using Windows Python 32 bit v2.6.8
> 
>  >
> 
>  > Download of the code here:
> 
>  >
> 
>  > https://www.box.com/s/2lupxeyk5jvsxs0zkdfb
> 
>  >
> 
>  > Copy of the code here:
> 
>  >
> 
>  > http://pastebin.com/MNdgiuSY
> 
>  >
> 
>  > Thanks in advance for your help...
> 
> 
> 
> 
> 
> I was actually thinking of making a simple rock paper scissors game so I
> 
> went ahead and cobbled it together, using a design with a class and
> 
> generally a structured approach.. It keeps the scores, too, and you can
> 
> set both players to be AI, or one to be AI, or both to be humans:
> 
> 
> 
> https://github.com/pythonbyexample/PBE/blob/master/code/rockpaper.py
> 
> 
> 
> (it needs python3 but can be easily changed to work with python2.x)
> 
> 
> 
> 
> 
>   - mitya
> 
> 
> 
> -- 
> 
> Lark's Tongue Guide to Python: http://lightbird.net/larks/

Well there goes my hopes and dreams of being the first one to do that. Nice job 
by the way.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Mitya Sirenef

On 12/16/2012 12:00 PM, Darrien Glasser wrote:
Hey guys, I'm working on a  Python rock paper scissors (lizard spock) game, and the beginning is 
complete. After I finished it, I thought, "You know what? I think I can 
make this even better, and add a score counter." And so I did.

>
> The problem is that it doesn't seem to actually keep track of score. 
In fact it always keeps the score at 0 for both players. It's fully 
functional otherwise, but it's bothering me that I can't get it to work.

>
> Currently using Windows Python 32 bit v2.6.8
>
> Download of the code here:
>
> https://www.box.com/s/2lupxeyk5jvsxs0zkdfb
>
> Copy of the code here:
>
> http://pastebin.com/MNdgiuSY
>
> Thanks in advance for your help...


I was actually thinking of making a simple rock paper scissors game so I
went ahead and cobbled it together, using a design with a class and
generally a structured approach.. It keeps the scores, too, and you can
set both players to be AI, or one to be AI, or both to be humans:

https://github.com/pythonbyexample/PBE/blob/master/code/rockpaper.py

(it needs python3 but can be easily changed to work with python2.x)


 - mitya

--
Lark's Tongue Guide to Python: http://lightbird.net/larks/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread tbg
On Sunday, December 16, 2012 12:50:18 PM UTC-5, Kwpolska wrote:
> On Sun, Dec 16, 2012 at 6:44 PM, tbg  wrote:
> 
> > I changed it so that it said winx += 1 etc. and it doesn't seem to save it. 
> > I also tried pulling the variables from the loop and making them global 
> > variables at the top.
> 
> >
> 
> > The latter game me a traceback error when printing out the results. Any 
> > ideas?
> 
> >
> 
> > http://puu.sh/1BCbG
> 
> >
> 
> > Code Preview/Download
> 
> >
> 
> > https://www.box.com/s/jiu0259nohx0kae2am57
> 
> > --
> 
> > http://mail.python.org/mailman/listinfo/python-list
> 
> 
> 
> Put this on top of your function:
> 
> 
> 
> global winx, winy
> 
> 
> 
> 
> 
> PS. Why did you put those delays in?  They are useless.
> 
> -- 
> 
> Kwpolska 
> 
> stop html mail  | always bottom-post
> 
> www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
> 
> GPG KEY: 5EAAEA16

I figured it would be too much for the person playing the game. Getting 
attacked with lines of text and all. Although it is a pain developing with it.

And by the way, works perfectly now. Thanks for your help.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Kwpolska
On Sun, Dec 16, 2012 at 6:44 PM, tbg  wrote:
> I changed it so that it said winx += 1 etc. and it doesn't seem to save it. I 
> also tried pulling the variables from the loop and making them global 
> variables at the top.
>
> The latter game me a traceback error when printing out the results. Any ideas?
>
> http://puu.sh/1BCbG
>
> Code Preview/Download
>
> https://www.box.com/s/jiu0259nohx0kae2am57
> --
> http://mail.python.org/mailman/listinfo/python-list

Put this on top of your function:

global winx, winy


PS. Why did you put those delays in?  They are useless.
-- 
Kwpolska 
stop html mail  | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread tbg
On Sunday, December 16, 2012 12:16:34 PM UTC-5, ru...@yahoo.com wrote:
> > Hey guys, I'm working on a Python rock paper scissors (lizard spock)
> 
> > game, and the beginning is complete. After I finished it, I thought,
> 
> > "You know what? I think I can make this even better, and add a score
> 
> > counter." And so I did.
> 
> > 
> 
> > The problem is that it doesn't seem to actually keep track of score.
> 
> > In fact it always keeps the score at 0 for both players. It's fully
> 
> > functional otherwise, but it's bothering me that I can't get it to
> 
> > work.
> 
> > 
> 
> > Currently using Windows Python 32 bit v2.6.8
> 
> > 
> 
> > Download of the code here:
> 
> > https://www.box.com/s/2lupxeyk5jvsxs0zkdfb
> 
> > 
> 
> > Copy of the code here:
> 
> > http://pastebin.com/MNdgiuSY
> 
> 
> 
> If you are keeping the score in 'winx 'and 'winy' then you are adding
> 
> one to the the values but not saving the results.
> 
> 
> 
> I think you want 
> 
> 
> 
>   winx = winx + 1
> 
> 
> 
> or more concisely,
> 
> 
> 
>   winx += 1

I changed it so that it said winx += 1 etc. and it doesn't seem to save it. I 
also tried pulling the variables from the loop and making them global variables 
at the top.

The latter game me a traceback error when printing out the results. Any ideas?

http://puu.sh/1BCbG

Code Preview/Download

https://www.box.com/s/jiu0259nohx0kae2am57
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Kwpolska
On Sun, Dec 16, 2012 at 6:25 PM,   wrote:
> On Sunday, December 16, 2012 10:09:53 AM UTC-7, Kwpolska wrote:
>>[...]
>> PS. please do not use pastebin.com.
>
> Why?
> --
> http://mail.python.org/mailman/listinfo/python-list

http://news.ycombinator.com/item?id=2595066 should answer this very question.
-- 
Kwpolska 
stop html mail  | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread rurpy
On Sunday, December 16, 2012 10:09:53 AM UTC-7, Kwpolska wrote:
>[...]
> PS. please do not use pastebin.com.

Why?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread tbg
Actually, I was just going to post that it wasn't saving the scores. Great 
timing, I'll try it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread rurpy
> Hey guys, I'm working on a Python rock paper scissors (lizard spock)
> game, and the beginning is complete. After I finished it, I thought,
> "You know what? I think I can make this even better, and add a score
> counter." And so I did.
> 
> The problem is that it doesn't seem to actually keep track of score.
> In fact it always keeps the score at 0 for both players. It's fully
> functional otherwise, but it's bothering me that I can't get it to
> work.
> 
> Currently using Windows Python 32 bit v2.6.8
> 
> Download of the code here:
> https://www.box.com/s/2lupxeyk5jvsxs0zkdfb
> 
> Copy of the code here:
> http://pastebin.com/MNdgiuSY

If you are keeping the score in 'winx 'and 'winy' then you are adding
one to the the values but not saving the results.

I think you want 

  winx = winx + 1

or more concisely,

  winx += 1
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Darrien Glasser
Awesome thanks, and sounds good. 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Kwpolska
On Sun, Dec 16, 2012 at 6:00 PM, Darrien Glasser
 wrote:
> Hey guys, I'm working on a Python rock paper scissors (lizard spock) game, 
> and the beginning is complete. After I finished it, I thought, "You know 
> what? I think I can make this even better, and add a score counter." And so I 
> did.
>
> The problem is that it doesn't seem to actually keep track of score. In fact 
> it always keeps the score at 0 for both players. It's fully functional 
> otherwise, but it's bothering me that I can't get it to work.
>
> Currently using Windows Python 32 bit v2.6.8
>
> Download of the code here:
>
> https://www.box.com/s/2lupxeyk5jvsxs0zkdfb
>
> Copy of the code here:
>
> http://pastebin.com/MNdgiuSY
>
> Thanks in advance for your help...
> --
> http://mail.python.org/mailman/listinfo/python-list

winx = winx + 1
winy = winy + 1

PS. please do not use pastebin.com.
-- 
Kwpolska 
stop html mail  | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
-- 
http://mail.python.org/mailman/listinfo/python-list


Trying to make a basic Python score counter in a game... will not count.

2012-12-16 Thread Darrien Glasser
Hey guys, I'm working on a Python rock paper scissors (lizard spock) game, and 
the beginning is complete. After I finished it, I thought, "You know what? I 
think I can make this even better, and add a score counter." And so I did.

The problem is that it doesn't seem to actually keep track of score. In fact it 
always keeps the score at 0 for both players. It's fully functional otherwise, 
but it's bothering me that I can't get it to work. 

Currently using Windows Python 32 bit v2.6.8

Download of the code here:

https://www.box.com/s/2lupxeyk5jvsxs0zkdfb

Copy of the code here:

http://pastebin.com/MNdgiuSY

Thanks in advance for your help...
-- 
http://mail.python.org/mailman/listinfo/python-list