Commit b082f57c by BellCodeEditor

save project

parent 3da41295
...@@ -2,7 +2,11 @@ class log: ...@@ -2,7 +2,11 @@ class log:
def __init__(self): def __init__(self):
self.log = {} self.log = {}
self.lognum = 0 self.lognum = 0
print('log 1.0.0\nHello from the log community.')
def att_log(self, log_key, log_word): def att_log(self, log_key, log_word):
self.lognum = self.lognum + 1 self.lognum = self.lognum + 1
self.log[log_key] = log_word self.log[log_key] = log_word
\ No newline at end of file
def cutall_log(self):
self.log = {}
\ No newline at end of file
import pygame as pg import pygame as pg
from pygame import locals
from log import log from log import log
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
...@@ -7,3 +8,8 @@ pg.init() ...@@ -7,3 +8,8 @@ pg.init()
# 创建一个窗口 # 创建一个窗口
win = pg.display.set_mode((800, 600)) win = pg.display.set_mode((800, 600))
win_log = log() win_log = log()
while True:
for event in pg.event.get():
if event.type == locals.QUIT:
exit()
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