Skip to content

Instantly share code, notes, and snippets.

@adammyhre
Created April 11, 2023 08:05
Show Gist options
  • Save adammyhre/8c55bbb846252ee616231ab2e1b0aa7c to your computer and use it in GitHub Desktop.
Save adammyhre/8c55bbb846252ee616231ab2e1b0aa7c to your computer and use it in GitHub Desktop.
namespace Match3 {
public class GridObject<T> {
GridSystem2D<GridObject<T>> grid;
int x;
int y;
T gem;
public GridObject(GridSystem2D<GridObject<T>> grid, int x, int y) {
this.grid = grid;
this.x = x;
this.y = y;
}
public void SetValue(T gem) {
this.gem = gem;
}
public T GetValue() => gem;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment