コード例 #1
0
"""
Basic pygame interface for minesweeper

- Written by SC 15/07/19
- edited by jmc 25/07/19
"""

import pygame
from objects import Board

# initialise board size and number of bombs
board = Board(10, 25)
bombs = board.bombs()
size = board.size()  # for now we just stick to 10

pygame.init()

# pygame text size
fontsize = 3*size
font = pygame.font.Font('freesansbold.ttf', fontsize)

# define colours
green = (0, 135, 56)
blue = (0, 0, 255)
red = (128, 13, 0)
turquoise = 12, 179, 151
black = (0, 0, 0)
white = (255, 255, 255)
grey = (140, 140, 140)
lightgrey = (207, 207, 207)