Permalink
Browse files

adding bejeweled blitz tiles

  • Loading branch information...
1 parent 265558b commit 32767754f5137989f648dcaca6c67c1bdc97ffbe @troynt committed Apr 23, 2011
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -5,13 +5,13 @@
def main():
""" load tiles """
tiles = {}
- for tile in glob.glob('gfx/tiles/*.bmp'):
+ for tile in glob.glob('gfx/bejeweled-blitz/tiles/*.bmp'):
key, ext = os.path.basename(tile).split('.')
tiles[key] = (cv.LoadImage(tile))
b = Board()
- b.setTileImages(tiles, 51, 51)
- b.findBoard('gfx/top_left_corner.bmp')
+ b.setTileImages(tiles, 40, 40)
+ b.findBoard('gfx/bejeweled-blitz/top_left_corner.bmp')
s = Strategy(b)
while 1:
View
@@ -107,7 +107,7 @@ def getTile(self, x, y, screenshot):
screenshot = cv_screenshot()
for color in self.tile_images:
results = findInRegion(self.tile_images[color], screenshot, tileX, tileY, self.tile_w, self.tile_h)
- if(results['score'] > .6):
+ if(results['score'] > .7):
self.board = string_replace_index(self.board, color, string_offset)
return color
return '0'

0 comments on commit 3276775

Please sign in to comment.