Skip to content
Browse files

Better files organization

  • Loading branch information...
1 parent 0ceeb48 commit f34210632fbed3a3d906384206a4c86bf9d5da23 @humbhenri committed Feb 23, 2010
View
0 board.bmp → res/board.bmp
File renamed without changes.
View
0 branca.bmp → res/branca.bmp
File renamed without changes.
View
0 nada.bmp → res/nada.bmp
File renamed without changes.
View
0 preta.bmp → res/preta.bmp
File renamed without changes.
View
0 tip.bmp → res/tip.bmp
File renamed without changes.
View
11 ui.py
@@ -8,6 +8,7 @@
from pygame.locals import *
import time
from config import BLACK, WHITE
+import os
if not pygame.font: print 'Warning, fonts disabled'
@@ -38,11 +39,11 @@ def __init__ ( self ):
self.font = pygame.font.SysFont ( "Times New Roman" , 22 )
# image files
- self.board_img = pygame.image.load ( "board.bmp" ).convert()
- self.black_img = pygame.image.load ( "preta.bmp" ).convert()
- self.white_img = pygame.image.load ( "branca.bmp" ).convert()
- self.tip_img = pygame.image.load ( "tip.bmp" ).convert()
- self.clear_img = pygame.image.load ( "nada.bmp").convert()
+ self.board_img = pygame.image.load (os.path.join("res", "board.bmp")).convert()
+ self.black_img = pygame.image.load (os.path.join("res", "preta.bmp")).convert()
+ self.white_img = pygame.image.load (os.path.join("res", "branca.bmp")).convert()
+ self.tip_img = pygame.image.load (os.path.join("res","tip.bmp")).convert()
+ self.clear_img = pygame.image.load (os.path.join("res","nada.bmp")).convert()
def show_options ( self ):
""" Shows game options screen and returns chosen options

0 comments on commit f342106

Please sign in to comment.
Something went wrong with that request. Please try again.