This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image, ImageFilter | |
| def getNeighbours(i, j, n, m) : | |
| arr = [] | |
| if i-1 >= 0 and j-1 >= 0 : | |
| arr.append((i-1, j-1)) | |
| if i-1 >= 0 : | |
| arr.append((i-1, j)) | |
| if i-1 >= 0 and j+1 < m : | |
| arr.append((i-1, j+1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ///@description instance_create_crop | |
| ///@arg x | |
| ///@arg y | |
| ///@arg crop_type | |
| // snap x,y position to a grid | |
| var cs = crops.cell_size; | |
| var gx = argument0 div cs; | |
| var gy = argument1 div cs; | |
| var i_grid = crops.ds_crop_instances; |