n.org"
>Subject: Re: [Tutor] Minesweeper the return
>Date: Wed, 20 Jul 2005 11:18:09 +1200 (NZST)
>
>Quoting Alberto Troiano <[EMAIL PROTECTED]>:
>
> > Please let's talk about this more! *grin*
> > I'm not sure if I'm following you, what I se
Quoting Alberto Troiano <[EMAIL PROTECTED]>:
> Please let's talk about this more! *grin*
> I'm not sure if I'm following you, what I see here is a function inside
> other function and the first function returns its inside function, but
> how does it work?
In Python, as in other modern languages,
little of C#, VB.NET, Pascal, QBasic and
C++ 6.0
But I would prefer to talk in theory or in general.
Thanks in advanced
Alberto
>From: Danny Yoo <[EMAIL PROTECTED]>
>To: Alberto Troiano <[EMAIL PROTECTED]>
>CC: tutor@python.org
>Subject: Re: [Tutor] Minesweeper the return
On Mon, 18 Jul 2005, Alberto Troiano wrote:
> I'm trying to create the buttons dinamically (that's not a problem) the
> problem is wherever I click the hello function returns the last button I
> created. I know that the problem is in the lambda part and that the variable
> i (the one I change t
berto
>From: "Alan G" <[EMAIL PROTECTED]>
>To: "Alberto Troiano" <[EMAIL PROTECTED]>,
>Subject: Re: [Tutor] Minesweeper implementing 20%,weird problem with
>matrixes
>Date: Thu, 14 Jul 2005 01:12:18 +0100
>
> > I initialize them by putting
> I initialize them by putting None along all the fields
Actually you don't.
def initialize(self):
self.buttonmatrix=[]
self.statematrix=[]
self.bombmatrix=[]
3 empty lists, so far so good.
for i in range(self.fil):
aux=[]
for j in ra
Hi Alberto,
The issue you're seeing is in the intialize() code:
##
def initialize(self):
self.buttonmatrix=[]
self.statematrix=[]
self.bombmatrix=[]
for i in range(self.fil):
aux=[]
for j in range(self.col):
aux.app
> Does this make sense so far? Please feel free to ask more questions.
I forgot to mention that you might want to look at:
http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
since it's relevant to the code that you're writing. Best of wishes to
you!
___
> How do I know which button did I click when all buttons have the
same name?
Put them in a matrix.
ie a list of lists. Then refer to them by their position inthe lists
so that the top left button is "buttons[0][0]" etc
This is also how you dynamically create your screen,
just iterate over the li
On Sat, 25 Jun 2005, Alberto Troiano wrote:
> My doubt is that I want to be able to allow the user to put how many
> bombs they want and how any spaces (how big is the board) so I will have
> to create buttons dinamically, but in doing this the reference to the
> buttons will be lost How do I kn
On 6/25/05, Alberto Troiano <[EMAIL PROTECTED]> wrote:
> Hey Tutors
> I have a question
> I want to make a minesweeper (just for practice) but I don't what can I use
> to make the GUI
> I was thinking about buttons (click event you know) and change the
> background image on change
> Maybe there's a
11 matches
Mail list logo