public static MoveAction ToMoveAction(this Vec vec) { return(new MoveAction(vec)); }
public static Vec OppositeTo(this Vec me, Vec opposite) { return((opposite - me).Rotate90CW().Rotate90CW() + me); }
public static IEnumerable <Vec> GetStopVecs(this State state, Vec vec) { return(state.GetWanderVecs(vec).Where(x => x.ManhattanDistTo(vec) == 1)); }
public static bool HasVector(this State state, Vec vec) { return(!(vec.X < 0 || vec.Y < 0 || vec.X >= state.Width || vec.Y >= state.Height)); }
public Cell GetAt(Vec position) => Map[position.Y, position.X];
public Effect(Vec origin, int timeLeft, int creatorId) { Origin = origin; TimeLeft = timeLeft; CreatorId = creatorId; }