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
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
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
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
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 ==
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:
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:
>>
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
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
>>
>
> 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
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
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
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
13 matches
Mail list logo