[Tutor] Trouble with classes - Pypeg again
->Terry<-
tvbare at socket.net
Mon Nov 21 05:52:20 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ok, I've got my peg game roughed out and I'm having
problems.
The error is:
Traceback (most recent call last):
File "pypeg.py", line 113, in ?
main()
File "pypeg.py", line 107, in main
x.draw_board() # Refresh screen
File "pypeg.py", line 30, in draw_board
screen.blit(Peg.peg, (Peg.pegs[i])) # Blit it.
AttributeError: class Peg has no attribute 'peg'
The new code is at:
<URL:http://members.socket.net/~tvbare/pypeg/new_pypeg.py>
I'm confused as to why. The whole OO picture
has my head reeling, but I thought I had some
grasp of the basics. Now I'm not so sure. d:^)
Thanks much,
- --
Terry
"Be who you are and say what you feel, because those
who mind don't matter and those who matter don't mind."
-- Dr. Seuss
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
iD8DBQFDgVKHQvSnsfFzkV0RAnlyAJ9snqBt0GOWS7IpimsMkB2xaBqu2gCbBovs
ATTVhm0JbWiz+VfKSxXrGqY=
=oGAu
-----END PGP SIGNATURE-----
More information about the Tutor
mailing list