Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame as pg
- pg.init()
- WIDTH = 600
- HEIGHT = 600
- LINE_COLOR = (186, 22, 12)
- BACKGROUND_COLOR = (18, 212, 199)
- screen = pg.display.set_mode((WIDTH, HEIGHT))
- pg.display.set_caption("Tic Tac Toe")
- screen.fill(BACKGROUND_COLOR)
- def draw_lines_on_board(line_width):
- pg.draw.line(screen, LINE_COLOR, (200, 0), (200, 600), line_width)
- pg.draw.line(screen, LINE_COLOR, (400, 0), (400, 600), line_width)
- pg.draw.line(screen, LINE_COLOR, (0, 200), (600, 200), line_width)
- pg.draw.line(screen, LINE_COLOR, (0, 400), (600, 400), line_width)
- draw_lines_on_board(15)
- while True:
- for event in pg.event.get():
- if event.type == pg.QUIT:
- exit(0)
- pg.display.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement