Skip to content

Instantly share code, notes, and snippets.

@Orpheon
Created August 29, 2011 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Orpheon/1178250 to your computer and use it in GitHub Desktop.
Save Orpheon/1178250 to your computer and use it in GitHub Desktop.
import pygame
def importMapRects():
rectList = []
text = open('Maps/Test_wm', 'r')
linesList = text.readlines()
for a in range(len(linesList)):
x = int(linesList[a].split(';')[0])
y = int(linesList[a].split(';')[1])
rectList.append(pygame.Rect(x, y, 1, 1))
return rectList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment