Tuesday, March 22, 2011

Mar. 22

http://dl.dropbox.com/u/24004516/scores.py
The above link is my continue onto the pitch game.
http://dl.dropbox.com/u/24004516/catch.py
The above link shows that the computer wins no matter what, even if you catch the ball. Whats weird is it tells me too add:
Text("Computer Wins!", (340, 290), size=32)
sleep(2)
after:
if ball_ x > 810:
But every time I moved the text up after if ball_x, it always came up as an error. The error was:
IndentationError: expected an indented block
http://dl.dropbox.com/u/24004516/catch.py
The above is the fixed version of catch. I was finally able to figure out that the IndentationError was because I didn't indent both Text... and sleep(2).
http://dl.dropbox.com/u/24004516/catch.py
The above program is the finished catch.py program. After finishing the program the first time, it ended up not working. After finding a few errors I was able to make the program to work thus showing ether player as the winner or computer as the winner after getting 5 points.

1 comment:

  1. As we discussed, I want you to start putting your code on Dropbox and linking to it.

    ReplyDelete