When i finished the part of my code that permanently displays all sprites once,it is still showing only on at a time. I really don't know where the problem is coming from,and thus i was unable to try anything of significance. I'm kind of a noob in pygame so sry if it seems dumb.
import pygame #libs
import socket
from pygame.locals import*
img = pygame.image.load('board.png')#image
circle = pygame.image.load('lowresc.png')#circle
cross = pygame.image.load('lowresx.png')#cross
pygame.init()
pygame.display.set_caption('BoardEngine') #window title
white = (255, 64, 64)
w = 650
h = 650
screen = pygame.display.set_mode((w, h))
screen.fill((white))
running = 1
pygame.event.pump()
key = pygame.key.get_pressed()
#values
amount_circles = 0
amount_crosses = 0
circles = []
crosses = []
a = 0 #amount of total items (may not work in multiplayer)
while running:
ev = pygame.event.get()
# proceed events
for event in ev:
screen.blit(img,(0,0))
if event.type == pygame.MOUSEBUTTONUP:
pos = pygame.mouse.get_pos()
circles.append(pos)
a = a + 1
if a > 0:
for i in range(len(circles)):
screen.blit(circle,(circles[len(circles) - 1]))
for i in range(len(crosses)):
screen.blit(cross,(crosses[len(crosses) - 1]))
pygame.display.flip()
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False