class WPawn():
def __init__(self, x, y):
self.x = x
self.y = y
self.image = pygame.transform.scale(pygame.image.load('wpawn.png'), (100,100))
class Game():
def __init__(self):
screen_width = 900
screen_height = 900
self.screen = pygame.display.set_mode((screen_width,screen_height))
pygame.display.set_caption ("Chess Project")
List = ['pawn1','pawn2','pawn3','pawn4','pawn5','pawn6','pawn7','pawn8']
for x in range (len(List)):
variable = (vars(self)[List[x]])
self.variable = WPawn(50,650)