import pygame class Board: # a class to manage the board def __init__(self, game): # Create board self.screen = game.screen self.screen_rect = game.screen.get_rect() # Load the board image # and get its "rect" self.image = pygame.image.load('tictactoeImage.png') self.rect = self.image.get_rect() # Center the board self.rect.centerx = self.screen_rect.centerx self.rect.top = self.screen_rect.top # blitme draws the board onto the screen def blitme(self): self.screen.blit(self.image, self.rect)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter