Skip to content

Instantly share code, notes, and snippets.

View gwoodhouse's full-sized avatar

Graeme Castle gwoodhouse

  • Toronto, Canada
View GitHub Profile
public bool findTarget(target) {
grid.forXY(int x, int y) {
if(grid[x,y] == target) return true
}
return false;
}
public static T? forXY<T>(this T[,] grid, Action<int, int> action) where T : class
{
for (int y = 0; y < grid.getHeight(); y++)
{
for (int x = 0; x < grid.getWidth(); x++)
{
action(x, y);
}
}
@gwoodhouse
gwoodhouse / rules.md
Created June 26, 2012 09:52 — forked from mainerror/rules.md
Android Stack Overflow chat room rules
  • You will not gain write access to the room if you have a low reputation score and/or have not asked & answered reasonable questions on Stack Overflow - do not repeatedly request write access, we know you're waiting for access and multiple requests will get you blocked.

  • Please do not ask a question unless you have first thoroughly researched it yourself.

  • developer.android.com has everything you should ever need to do all but the most advanced functionality. 99% of the time your solution will be there.

  • Please speak English as correctly as you're able.

  • Do not paste code into chat, instead use a site such as Pastebin.