Я новичок в pygame, и я хотел знать, что не так, и как я могу исправить его, спасибо! также мой pygame закрывается, когда я его открываю, вот почему я сделал скриншот, как этот. если бы вы могли также объяснить, почему он быстро закрывается, это было бы здорово! ! (Pygame 1.9.2 питон 3.4.1, окна 8) [введите описание изображения здесь] [1]ошибка типа pygame.surface: требуется целое число
#!/usr/bin/env python
import pygame, sys
from pygame.locals import *
pygame.init()
pygame.font.init()
pygame.display.set_caption('Primer juego de Gian Di Julio')
mainclock= pygame.time.Clock()
screen = pygame.display.set_mode((800,600))
pygame.mouse.set_visible(0)
#positioning the ship into the middle of the screen
ship = pygame.image.load('ship.png')
ship_top = screen.get_height() - ship.get_height()
ship_left = screen.get_width()/2 - ship.get_width()/2
pygame.Surface(ship,(ship_left,ship_top))
while True:
screen.fill((0,0,0))
x,y = pygame.mouse.get_pos()
screen.blit(ship, (x-ship.get.width()/2, ship_top))
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
pygame.display.update()
pygame.display.flip()