Skip to content

Instantly share code, notes, and snippets.

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))
@bomba11
bomba11 / instance_create_crop.gml
Created March 18, 2021 22:54 — forked from multimentha/instance_create_crop.gml
GameMaker Studio - FriendlyCosmonaut's Farming RPG Tutorial: require player to to be close to the soil
///@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;