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