Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавлены скобки для print. #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#You were importing all widgets anyway, and there was an unknown error.

class Game(object):
print "Setting global Game params."
print("Setting global Game params.")
# Game parameters
BG_TILE_IMG = 'images/wood2.png'
BUTTON_BGIMG = 'images/x.png'
Expand All @@ -28,7 +28,7 @@ class Game(object):

def __init__(self):
pygame.init()
print "Pygame started."
print("Pygame started.")

#set up screen and background
self.screen = pygame.display.set_mode(
Expand All @@ -38,7 +38,7 @@ def __init__(self):

#Drawing a handy MessageBoard widget
#Can use these for any text.
print "Configuring tboard MessageBoard params."
print("Configuring tboard MessageBoard params.")
self.tboard_text = ['This is a test.']
self.tboard_x = 120
self.tboard_y = 120
Expand All @@ -56,7 +56,7 @@ def __init__(self):
font=('comic sans', 18),
font_color=pygame.Color('yellow'))

print "Moving on to buttons..."
print('Moving on to buttons...')

self.button_bgimgs = ['images/x.png']
#self.button_width = self.button_bgimgs[0].get_width()
Expand All @@ -73,7 +73,7 @@ def __init__(self):
imgnames=self.button_bgimgs,
attached=self.tboard)

print "Created close button."
print("Created close button.")

self.togglebtn_bgimgs = ['images/toggle1.png', 'images/toggle2.png']

Expand All @@ -85,7 +85,7 @@ def __init__(self):
text="Toggle",
textcolor=(255,255,255))

print "Created toggle button."
print("Created toggle button.")

self.clockImg = Images(self.screen,
'images/clock.png',
Expand Down Expand Up @@ -134,7 +134,7 @@ def __init__(self):
self.options = dict(debug=True,
draw_grid=False)

print "Done setting game options, exiting Game init."
print("Done setting game options, exiting Game init.")

def xy2coord(self, pos):
""" Convert a (x, y) pair to a (nrow, ncol) coordinate
Expand Down Expand Up @@ -197,7 +197,7 @@ def draw(self):
obj.draw()

def run(self):
print "Beginning run sequence."
print("Beginning run sequence.")
# The main game loop
#
while True:
Expand Down Expand Up @@ -258,7 +258,7 @@ def quit(self):


if __name__ == "__main__":
print "Creating game object..."
print("Creating game object...")
game = Game()
print "Done. Starting run method"
print("Done. Starting run method")
game.run()