'목록하단 광고 치환자(withSeok)
728x90
1
2
3
4
5
6
import pygame, sys
from pygame.locals import *
 
pygame.init()
displayset=pygame.display.set_mode((400,300))
 
cs

1
2
3
4
5
6
7
import pygame, sys
from pygame.locals import *
 
pygame.init()
displayset=pygame.display.set_mode((400,300))
pygame.display.set_caption('Hello Python Window')
 
cs

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pygame, sys
from pygame.locals import *
    # pygame.locals 안에 정해 놓은
    # 상수들을 많이 사용.
 
pygame.init()
    # pygame 함수를 호출하기전 반드시 필요한 문구
    # 없을시 pygem.erroe:font not initialized
displaySurface=pygame.display.set_mode((400,300))
pygame.display.set_caption('Hello Python Window')
while True:     # main loop
    for event in pygame.event.get():
                # 새로 발생한 이벤트가 없는지 검사
                # 아무 이벤트도 발생하지 않았다면 빈 목록이 반환됨
        if event.type==QUIT:
                # pygame.locals.QUIT
            pygame.quit()   # pygame 라이브러리 종료
            sys.exit()  # 프로그램 자체 종료
        pygame.display.update()
 
cs
728x90

+ Recent posts