Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/drawxos.py
diff options
context:
space:
mode:
authorJason Rock <jrock@jrock-desktop.(none)>2009-03-20 01:49:13 (GMT)
committer Jason Rock <jrock@jrock-desktop.(none)>2009-03-20 01:49:13 (GMT)
commitd6e391eeb2ae8dca1ec641cffd7d30e20b7072e5 (patch)
treec289d5f56493c80e9600b94c80cdf768f8bc5662 /drawxos.py
parentbfc7191293ce0e2eebb30fbc48e6927fcf0ce62f (diff)
Rewrote the pygame codeHEADmaster
repeatedpic.py is a more pythonic/OO version of the origional drawxos.
Diffstat (limited to 'drawxos.py')
-rw-r--r--drawxos.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/drawxos.py b/drawxos.py
index ac1b3cd..fcc6ed9 100644
--- a/drawxos.py
+++ b/drawxos.py
@@ -2,7 +2,9 @@ import os, sys
import pygame
from pygame.locals import *
-def drawXOs(screen,image,x=3,y=3,backgroundColor=(255,255,255)):
+
+def drawXOs(image,x=3,y=3,backgroundColor=(255,255,255)):
+ screen = pygame.display.get_surface()
(xsize,ysize) = screen.get_size()
(xx,yy) = image.get_size()
mult = min(float(xsize)/(xx*x),float(ysize)/(yy*y))
@@ -28,11 +30,11 @@ def drawXOs(screen,image,x=3,y=3,backgroundColor=(255,255,255)):
def main():
pygame.init()
- screen = pygame.display.set_mode((1280,1000))
+ pygame.display.set_mode((1280,1000))
image = pygame.image.load("XO.png")
- drawXOs(screen,image,100,50);
+ drawXOs(image,100,50);
raw_input()