2020大作業
@piepie01
What we're going to do~
作業下載 & 實際操作
pip install pygame
python main.py
按他
參數介紹 & baba動起來
Movement.py
def up(shot):
print(shot.width, shot.height)
print(shot.dir_objects)
print(shot.objects)
print(shot.win)
return shot
def down(shot):
return shot
def left(shot):
return shot
def right(shot):
return shot
def up(shot):
print(shot.width, shot.height)
print(shot.dir_objects)
print(shot.objects)
print(shot.win)
return shot
def down(shot):
return shot
def left(shot):
return shot
def right(shot):
return shot
def up(shot):
print(shot.width, shot.height)
# 20 20
def up(shot):
print(shot.dir_objects)
# {'baba' : [[5, 5], [6, 6]]}
def up(shot):
print(shot.objects)
# {'flag' : [[15, 15]],
# 'text_baba' : [[3, 3]]}
def up(shot):
print(shot.win)
# False
def up(shot):
return shot
'baba'
'wall'
'flag'
'text_is'
'text_baba'
'text_you'
'text_flag'
'text_win'
'text_wall'
'text_stop'
score : 30/100
score : 50/100
score : 10/100
score : 10/100