OS is windows
Terminal => Windows Subsystem For Linux
Ps: When I run it through Windows PowerShell it runs, but I want to run it through ubuntu, because I use ubuntu not Windows PowerShell
I know that there is a lot of similar questions on stackoverflow to mine, but it is not working. Problem is I am trying to run the code and I am getting this error
Traceback (most recent call last): File "/mnt/c/Users/owner/Desktop/Projects/games/tic-tac-toe/tic_tac_to.py", line 11, in screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.error: No available video device
My code:
import pygame, sys
pygame.init()
# Const variables
WIDTH = 600
HEIGHT = 600
RED = (255,0,0)
BACKGROUND_COLOR = (20, 189, 172)
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("TIC-TAC-TOE")
screen.fill(BACKGROUND_COLOR)
# mainloop
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
pygame.display.update()