Skip to content

Commit

Permalink
Monkeys are now randomized for the first time.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clancey committed Jul 10, 2013
1 parent a41101f commit 6dec2f7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions MonkeyBox/Monkey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ namespace MonkeyBox
{
public class Monkey
{
static Random random = new Random();
public Monkey ()
{
Scale = (float)Math.Max(random.NextDouble(),.25);
X = (float)random.NextDouble();
Y = (float)random.NextDouble();
}
public string Name {get;set;}
public float Rotation {get;set;}
Expand All @@ -22,19 +26,19 @@ public static Monkey[] GetAllMonkeys()
Name = "Fred",
},
new Monkey{
Name = "George"
Name = "George",
},
new Monkey {
Name = "Hootie"
Name = "Hootie",
},
new Monkey {
Name = "Julian"
Name = "Julian",
},
new Monkey {
Name = "Nim"
Name = "Nim",
},
new Monkey {
Name = "Pepe"
Name = "Pepe",
}
};
}
Expand Down

0 comments on commit 6dec2f7

Please sign in to comment.