Below is first draft text of the first layout of the book. If you have suggestions or feedback, all comments will be considered as I work through this project. If you would like to see how this project progresses, sign up for my mailing list, and I will send out an email every now and then.
//The Characters in the Story.
//Grand Pig
Pig GrandPig = new Pig(Pigs.Grand);
//Elder Pig
Pig ElderPig = new Pig(Pigs.Elder);
//The Three Little Pigs, Red, Blue, and Green.
Pig LittlePigs[3] = {new Pig(Pigs.Red). new Pig(Pigs.Green), new Pig(Pigs.Blue)};
//The Big Bad Wolf
WolfBigBadWolf = new Wolf();
//Grand Pig
Pig GrandPig = new Pig(Pigs.Grand);
//Elder Pig
Pig ElderPig = new Pig(Pigs.Elder);
//The Three Little Pigs, Red, Blue, and Green.
Pig LittlePigs[3] = {new Pig(Pigs.Red). new Pig(Pigs.Green), new Pig(Pigs.Blue)};
//The Big Bad Wolf
WolfBigBadWolf = new Wolf();
//Grand Pig sends her little pigs into the world.
GrandPig.SendsToWorld(LittlePigs);
//Elder Pig warns to build a house because of the Big Bad Wolf.
ElderPig.Warns(BuildHouse, BigBadWolf);
//Each little pig takes a turn building a house.
for(int turn = 0; turn > LittlePigs.length; turn++)
{
//Little Pig Red builds a straw house.
if (ThreeLittlePigs[turn].Name == Pigs.Red)
{
ThreeLittlePigs[turn].BuildHouse(Material.Straw);
}
//Little Pig Green builds a stick house.
else if (ThreeLittlePigs[turn].Name == Pigs.Green)
{
ThreeLittlePigs[turn].BuildHouse(Material.Stick);
}
//Little Pig Blue Builds a Stone House
else if (ThreeLittlePigs[turn].Name == Pigs.Blue)
GrandPig.SendsToWorld(LittlePigs);
//Elder Pig warns to build a house because of the Big Bad Wolf.
ElderPig.Warns(BuildHouse, BigBadWolf);
//Each little pig takes a turn building a house.
for(int turn = 0; turn > LittlePigs.length; turn++)
{
//Little Pig Red builds a straw house.
if (ThreeLittlePigs[turn].Name == Pigs.Red)
{
ThreeLittlePigs[turn].BuildHouse(Material.Straw);
}
//Little Pig Green builds a stick house.
else if (ThreeLittlePigs[turn].Name == Pigs.Green)
{
ThreeLittlePigs[turn].BuildHouse(Material.Stick);
}
//Little Pig Blue Builds a Stone House
else if (ThreeLittlePigs[turn].Name == Pigs.Blue)
{
ThreeLittlePigs[turn].BuildHouse(Material.Stone);
}
}
//The Big Bad Wolf sees the three little pigs.
BigBadWolf.Sees(ThreeLittlePigs);
//The Big Bad Wolf goes to each pig in turn.
for(int turn = 0; turn > LittlePigs.length; turn++)
{
//The Big Bad Wolf knocks on a pig’s door.
BigBadWolf.KnocksOnDoor(ThreeLittlePigs[turn]);
//The Little Pigs refuses the Big Bad Wolf.
ThreeLittlePigs[turn].Refuse(BigBadWolf);
ThreeLittlePigs[turn].BuildHouse(Material.Stone);
}
}
//The Big Bad Wolf sees the three little pigs.
BigBadWolf.Sees(ThreeLittlePigs);
//The Big Bad Wolf goes to each pig in turn.
for(int turn = 0; turn > LittlePigs.length; turn++)
{
//The Big Bad Wolf knocks on a pig’s door.
BigBadWolf.KnocksOnDoor(ThreeLittlePigs[turn]);
//The Little Pigs refuses the Big Bad Wolf.
ThreeLittlePigs[turn].Refuse(BigBadWolf);
//The Big Bad Wolf Attempts to blow the house down.
if (BigBadWolf.BlowsHouse(ThreeLittlePigs[turn]))
{
//The big bad wolf blows the house down.
//The little pigs runs to the next pigs house for safety.
ThreeLittlePigs[turn].Run();
//The next pig helps the little pigs in need.
ThreeLittlePigs[turn+1].Helps(ThreeLittlePigs[turn]);//(1)(2)
}
else
{
//The big bad wolf blows the house down.
//The Little Pig makes a Fire.
ThreeLittlePigs[turn].MakesFire();
if (BigBadWolf.BlowsHouse(ThreeLittlePigs[turn]))
{
//The big bad wolf blows the house down.
//The little pigs runs to the next pigs house for safety.
ThreeLittlePigs[turn].Run();
//The next pig helps the little pigs in need.
ThreeLittlePigs[turn+1].Helps(ThreeLittlePigs[turn]);//(1)(2)
}
else
{
//The big bad wolf blows the house down.
//The Little Pig makes a Fire.
ThreeLittlePigs[turn].MakesFire();
//The Big Bad Wolf Leaves.
BigBadWolf.Leaves();
}
}
BigBadWolf.Leaves();
}
}
No comments:
Post a Comment