public static VisualObject CreateRandom(string name, Random rand = null) { if (rand == null) { rand = new Random(name.GetHashCode()); } return(new VisualObject( name, Speed.CreateRandom(rand), Coordinate.CreateRandom(rand), Color.CreateRandom(Color.CurrentColorsPalette, rand), Color.CreateRandom(Color.HistoryColorsPalette, rand))); }
public static VisualObject CreateOnNodeType(string name, string nodeType, Random rand = null) { if (rand == null) { rand = new Random(name.GetHashCode()); } return(new VisualObject( name, Speed.CreateRandom(rand), Coordinate.CreateRandom(rand), Color.CreateColorNodeType(nodeType), Color.CreateColorNodeType(nodeType))); }