Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / level3-lesson24-diy3

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 1fd8bffd authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent b810147b c112593l1746p256a15898/wx057783
Show whitespace changes
Inline Side-by-side
Showing with 26 additions and 5 deletions
  • c.py
  • ccc/background.png
  • ccc/gray_ball.png
  • ccc/main.py
  • www.py
c.py 0 → 100644
View file @ 1fd8bffd
This diff is collapsed. Click to expand it.
ccc/background.png 0 → 100644
View file @ 1fd8bffd
ccc/background.png

172 KB

This diff is collapsed. Click to expand it.
ccc/gray_ball.png 0 → 100644
View file @ 1fd8bffd
ccc/gray_ball.png

9.96 KB

This diff is collapsed. Click to expand it.
ccc/main.py 0 → 100644
View file @ 1fd8bffd
import pygame
import sys
from pygame.locals.import *
from random import *
class Ball(pygame.sprite.Sprite):
def __init__(self,image,position,speed,bg_size):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.image.load(image).convert_alpha()
self.rect=self.image.get_rect()
self.rect.left, self.rect.top = position
self.speed=speed
self.width, self.height = bg_size[0],bg_size[1]
def move(self):
selff.rect= self.rect.move(self.speed)
if self.rect.right < 0 :
self.rect.left = self.width
elif self.rect.left > self.width:
self.rect.right = 0
elif self.rect.bottom < 0:
self.rect.top = self.height
elif self.rect.top > self.height:
self.rect.bottom=0
def main():
pygame.
This diff is collapsed. Click to expand it.
www.py deleted 100644 → 0
View file @ b810147b
i=100
while i>0 or i==0:
print(i)
i=i-1
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment