import pygame
from pygame.locals import *
import sys
pygame.init() # Pygameの初期化
sc = pygame.display.set_mode((500, 500)) # 大きさ400*300の画面を生成
pygame.display.set_caption("練習4") # タイトルバーに表示する文字
font = pygame.font.Font("ipaexg.ttf", 70)
while (1):
t1 = font.render("金", True, (255,0,0))
sc.blit(t1, [100, 100])
t2 = font.render("銀", True, (255,0,0))
sc.blit(t2, [200, 100])
t3 = font.render("王", True, (255,0,0))
sc.blit(t3, [300, 100])
pygame.display.update() # 画面を更新
for event in pygame.event.get():
if event.type == QUIT: # 閉じるボタンが押されたら終了
pygame.quit() # Pygameの終了(画面閉じられる)
sys.exit()
最終更新:2018年01月20日 10:38