Created
January 23, 2014 10:51
-
-
Save NithishKolli/8576623 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
displayString = "Babu faggot" | |
def initialiseWindow(): | |
#Intiliase values | |
(width,height)= 400,500 | |
screen = pygame.display.set_mode((width,height)) | |
pygame.display.set_caption('Hangman by Nitesh') | |
background_colour = (255,255,255) | |
screen.fill(background_colour) | |
#Add string to the screen | |
font=pygame.font.Font(None, 36) | |
text = font.render(displayString, 1, (10, 10, 10)) | |
textpos = text.get_rect() | |
textpos.centerx = background.get_rect().centerx | |
background.blit(text, textpos) | |
# Blit everything to the screen | |
screen.blit(background, (0, 0)) | |
pygame.display.flip() | |
running = True | |
while running: | |
for event in pygame.event.get(): | |
if event.type == pygame.QUIT: | |
running = False | |
if __name__ == '__main__': | |
initialiseWindow() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment