public MatPosition(MatLocation location, int directionValue) { this.Location = location; var dir = Directions.GetAll().Where(x => x.Value == directionValue).FirstOrDefault(); if (dir != null) { this.Direction = dir; } }
public MatPosition(MatLocation location, Direction direction) { this.Location = location; this.Direction = direction; }