Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. connected_coords = []# this is the list of sides that are connected with the side being checked
  2. connected_coords += match_coord
  3.  
  4. if new_tile["Middle"] == match_type:# this is necessary to make it crawl in all directions when the middle is the same type as the connection
  5. for i in new_tile[match_type]:
  6. next_tiles_to_check.append([i, new_tile])
  7. if i not in connected_coords:
  8. connected_coords.append(i)
  9.  
  10. #[...]
  11.  
  12. if meeples_in_cluster > 0:
  13. coord_with_meeple = connected_coords # this tell us on which side a meeple CANNOT be placed
  14. else:
  15. coord_with_meeple = []
  16.  
  17. coord_with_meeple += new_tile["Farm"]# not possible to place a meeple on a farm for now
  18.  
  19. return points, already_checked, coord_with_meeple
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement