Re: [Tutor] Livewires questions

2007-07-29 Thread Tonu Mikk
Luke Paireepinart wrote: >> >> >> Sure, sure. I'm glad it at least ran. I don't have livewires >> installed so I wasn't able to test any of the code I wrote. >> >> Thanks again for your help. If you have suggestions on the 't' key, >> please share them. This seems to be the one issue p

Re: [Tutor] Livewires questions

2007-07-28 Thread Luke Paireepinart
Luke Paireepinart wrote: > > > I ran the code that you had included, thank you for this. It did > produce the player and the robot on the grid, but the keyboard > commands > did not work. I wasn't entire sure why, but I thought I would let > you know. > > > Sure, sure. I'm gl

Re: [Tutor] Livewires questions

2007-07-27 Thread Tonu Mikk
Luke Paireepinart wrote: >> def place_robot(): >> global robot_x >> global robot_y >> global robot_shape >> robot_y = random_between(0,47)-0.5 >> robot_x = random_between(0,63)-0.5 >> > I'm not too clear why you're subtracting 0.5 here. > Doesn't this make the robot's center

Re: [Tutor] Livewires questions

2007-07-26 Thread Luke Paireepinart
Tonu Mikk wrote: > Luke, thank you for your quick and complete response. Based on your > suggestions I have already made some progress! BTW, I am so glad that > I can ask this list my Python questions and get help. I began feeling > quite stuck and not knowing where to turn for help. So, tha

Re: [Tutor] Livewires questions

2007-07-26 Thread Eric Brunson
Tonu Mikk wrote: > Eric Brunson wrote: > >> Tiger12506 wrote: >> >> Based on your guidance, I figured it out. I need to use a return statement, which I had not encountered before. Now I wrote my definitions in this way: def collided(): if player_x ==

Re: [Tutor] Livewires questions

2007-07-26 Thread Tonu Mikk
Eric Brunson wrote: > Tiger12506 wrote: > >>> Based on your guidance, I figured it out. I need to use a return >>> statement, which I had not encountered before. Now I wrote my >>> definitions in this way: >>> >>> def collided(): >>>if player_x == robot_x+0.5 and player_y == robot_y+0.5:

Re: [Tutor] Livewires questions

2007-07-26 Thread Eric Brunson
Tonu Mikk wrote: > Tiger12506 wrote: > >>> Based on your guidance, I figured it out. I need to use a return >>> statement, which I had not encountered before. Now I wrote my >>> definitions in this way: >>> >>> def collided(): >>>if player_x == robot_x+0.5 and player_y == robot_y+0.5: >>

Re: [Tutor] Livewires questions

2007-07-26 Thread Eric Brunson
Tiger12506 wrote: >> Based on your guidance, I figured it out. I need to use a return >> statement, which I had not encountered before. Now I wrote my >> definitions in this way: >> >> def collided(): >>if player_x == robot_x+0.5 and player_y == robot_y+0.5: >> return True >> Gr

Re: [Tutor] Livewires questions

2007-07-26 Thread Tonu Mikk
Tiger12506 wrote: >> Based on your guidance, I figured it out. I need to use a return >> statement, which I had not encountered before. Now I wrote my >> definitions in this way: >> >> def collided(): >>if player_x == robot_x+0.5 and player_y == robot_y+0.5: >> return True >> >

Re: [Tutor] Livewires questions

2007-07-26 Thread Tiger12506
> Based on your guidance, I figured it out. I need to use a return > statement, which I had not encountered before. Now I wrote my > definitions in this way: > > def collided(): >if player_x == robot_x+0.5 and player_y == robot_y+0.5: > return True This could be simplified more. He

Re: [Tutor] Livewires questions

2007-07-26 Thread Tonu Mikk
Luke, thank you for your quick and complete response. Based on your suggestions I have already made some progress! BTW, I am so glad that I can ask this list my Python questions and get help. I began feeling quite stuck and not knowing where to turn for help. So, thank you for the great ser

Re: [Tutor] Livewires questions

2007-07-25 Thread Luke Paireepinart
As promised, here's some comments on your code. from livewires import * begin_graphics() allow_moveables() def place_player(): global player_x global player_y global player_shape player_y = random_between(0,47) player_x = random_between(0,63) player_shape = circle(10*pla

Re: [Tutor] Livewires questions

2007-07-25 Thread Luke Paireepinart
Tonu Mikk wrote: > Thanks for offering to help! I am following the Livewires exercise > (attached file "5-robots.pdf"). I have gotten as far as page 7. > Attached is also my code so far in robotsarecoming-teleport.py. > Question 1. I was checking for collision of a robot and player first > i