Darwin's World Simulation in C#: The Model/View Classes.

Richard Wiener · The Journal of Object Technology · 2010

V OL.9, NO. 2. int numHopper, int numChangeDirectionRover) { for (int i = 0; i < numRover; i++) { int x = rnd.Next(0, 15); int y = rnd.Next(0, 15); if (Global.creatures[x,y] == null) { Direction direction = RandomDirection(); Global.creatures[x,y] = new Creature("Rover.txt",new Point(y, x), direction, Color.Green, CreatureType.Rover); display(false, new Point(0, 0), new Point(y, x), "R", Color.Green, direction); list.Add(Global.creatures[x,y]); } else { i--; } } for (int i = 0; i < numAndroid; i++) { int x = rnd.Next(0, 15); int y = rnd.Next(0, 15); if (Global.creatures[x,y] == null) { Direction direction = RandomDirection(); Global.creatures[x,y] = new Creature("Android.txt",new Point(y, x), direction, Color.Blue, CreatureType.Android); display(false, new Point(0, 0), new Point(y, x), "A", Color.Blue, direction); list.Add(Global.creatures[x,y]); } else { i--; } } for (int i = 0; i < numTrap; i++) { int x = rnd.Next(0, 15); int y = rnd.Next(0, 15); if (Global.creatures[x,y] == null) { Direction direction = RandomDirection(); Global.creatures[x,y] = new Creature("Trap.txt",new Point(y, x), direction, Color.Red, CreatureType.Trap); display(false, new Point(0, 0), new Point(y, x), "T", Color.Red, direction); list.Add(Global.creatures[x,y]); } else { i--; } } for (int i = 0; i < numFood; i++) {

Read the paper · More papers on PaperTik