def make_king(self): self.king = True
# Draw game board screen.fill(WHITE) for row in range(ROWS): for col in range(COLS): if (row + col) % 2 == 1: pygame.draw.rect(screen, BLACK, (col * SQUARE_SIZE, row * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE)) if board[row][col] != 0: color = board[row][col].color pygame.draw.circle(screen, color, (col * SQUARE_SIZE + SQUARE_SIZE // 2, row * SQUARE_SIZE + SQUARE_SIZE // 2), SQUARE_SIZE // 2 - 10) checker 2 player game unblocked
# Define piece class class Piece: def __init__(self, row, col, color): self.row = row self.col = col self.color = color self.king = False def make_king(self): self
# Create game board board = [] for row in range(ROWS): board_row = [] for col in range(COLS): if (row + col) % 2 == 1: if row < 3: board_row.append(Piece(row, col, RED)) elif row > 4: board_row.append(Piece(row, col, (0, 0, 255))) else: board_row.append(0) else: board_row.append(0) board.append(board_row) (col * SQUARE_SIZE
Profil Załóż Darmowe konto Zapomniałem hasła Aktywności znajomych Konkursy Edytuj profil
Tapety Dodaj tapetę Top tapety Ranking tapet Moje ulubione tapety Ranking dodane tapety
Użytkownicy Ranking użytkowników Forum Ostatnie komentarze Rangi użytkowników Blog tapeciarni
Pomoc Jak umieścić tapetę na pulpicie? Regulamin Kontakt FAQ Zasady Tapeciarnia.pl
Dodatki Program TapeciarniA Widget na bloga Co to jest widget? Polityka ciasteczek/prywatności