Skip to content

Instantly share code, notes, and snippets.

View tacoe's full-sized avatar
🌮

Taco Ekkel tacoe

🌮
View GitHub Profile
public static IEnumerable<GridPoint> Neighbors(TileType[,] graph, GridPoint center)
{
// NESW
GridPoint pt1 = new GridPoint(center.x, center.y - 1);
if (IsValidNeighbor(graph, pt1))
yield return pt1;
GridPoint pt2 = new GridPoint(center.x - 1, center.y);
if (IsValidNeighbor(graph, pt2))
yield return pt2;
using UnityEngine;
// a class to work with 2D-points on our map grid
public class GridPoint
{
public readonly int x, y;
public GridPoint(int X, int Y) { x = X; y = Y; }
public GridPoint(float X, float Y) { x = (int)X; y = (int)Y; }
public GridPoint(Vector2 v2) { x = (int)v2.x; y = (int)v2.y; }

Keybase proof

I hereby claim:

  • I am tacoe on github.
  • I am tacoe (https://keybase.io/tacoe) on keybase.
  • I have a public key whose fingerprint is 1425 13C2 5243 3AE0 0C33 42E7 0A19 687A B5CF 7BDF

To claim this, I am signing this object:

@tacoe
tacoe / userstyle.css
Created November 20, 2012 09:19
Flowdock smaller window mode
/* todo: get rid of ugly !important overrides */
@media screen {
/* fix ugly active shadow */
menu#users ul.online .user.active {
-webkit-box-shadow: 0px 0px 0px 1px black !important;
box-shadow: 0px 0px 0px 1px black !important;
}
@tacoe
tacoe / gist:2900840
Created June 9, 2012 12:38
::open behavior sketch
// ...
SoftwareSerial wifiSerial(8,9);
WiFly wifly;
// ...
void setupWifi() {
wifiSerial.begin(9600);