# Libraries
import tsk
import pygame
pygame.init()
# Setup
window = pygame.display.set_mode([400, 200])
circle_x = 200
# Main loop
running = True
while running:
# Respond to events
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Control circle here
if tsk.get_key_pressed(pygame.K_LEFT):
circle_x -= 1
if tsk.get_key_pressed(pygame.K_RIGHT):
circle_x += 1
# Draw
window.fill((255, 255, 255))
pygame.draw.circle(window, (0, 0, 0), (circle_x, 100), 25)
pygame.display.flip()