Python 32장 [turtle 퐁 게임]
▣ MainGame.py : 전체메인게임을 조절하는 소스코드
▣ player.py : 플레이어를 다루는 소스코드
▣ ball.py : 공을 다루는 소스코드
▣ score.py : 점수를 다루는 소스코드
▣ MainGame.py
▣ player.py
▣ ball.py
▣ score.py
https://docs.python.org/3/library/turtle.html
turtle — Turtle graphics
Source code: Lib/turtle.py Introduction: Turtle graphics is an implementation of the popular geometric drawing tools introduced in Logo, developed by Wally Feurzeig, Seymour Papert and Cynthia Solo...
docs.python.org
▣ 핵심함수
▣ screen= turtle.Screen() : 스크린객체
▣ screen.setup() : 화면크기 조절 함수
▣ screen.tracer(0) : 애니메이션 false
▣ screen.list() : 스크린에 입력을 받기 위한 함수
▣ screen.onkey(호출함수, "키값") : 입력함수
▣ time.sleep(초) : 초 단위로 대기(너무 빠른 화면 업데이트에 딜레이를 주기 위함)
▣ goto(x, y) : x, y 좌표로 이동함
▣ write(문자, 굵기, 폰트) : 문자를 쓰는 함수
▣ hideturtle() : 터틀을 숨기는 함수