public static void Death(Frog frog) { Sounds.End(); Console.Clear(); Sounds.OverTheGameSound(); FrogHome home = new FrogHome(); home.RenderOnPosition(0, 5); frog.Coll = 48; frog.Row = 48; frog.PrintFrog(frog.Coll, frog.Row); frog.Lives--; }
public static void Death(Frog frog) { Sounds.End(); Console.Clear(); Sounds.OverTheGameSound(); FrogHome home = new FrogHome(); home.RenderOnPosition(0, 5); frog.Coll = 48; frog.Row = 48; frog.PrintFrog(frog.Coll, frog.Row); frog.Lives--; }
static void Main(string[] args) { Console.BufferHeight = Console.WindowHeight = MaxHeight; Console.BufferWidth = Console.WindowWidth = MaxWidth; // main screen DrawingScreen.DrawMainScreen(); Console.Clear(); FrogHome home = new FrogHome(); home.RenderOnPosition(0, 5); // main engine Engine(); }
private static void FrogOverTheRiverMainLogic(List <Tree> treesFR, List <Tree> treesSR, List <Tree> treesTR, List <Flowers> flowersFR, List <Flowers> flowersSR, Random randGen, ref int nextElementFl, ref int counterFl, int slower, Frog frog, ref bool onElement) { // frog on islands onElement = FrogOnTree(treesFR, frog, onElement); onElement = FrogOnTree(treesSR, frog, onElement); onElement = FrogOnTree(treesTR, frog, onElement); //Flower move onElement = FrogOnFlower(flowersFR, frog, onElement); onElement = FrogOnFlower(flowersSR, frog, onElement); if (slower % 2 == 0) { if (flowersFR.Count < 3 && counterFl == nextElementFl) { flowersFR.Add(new Flowers(MaxHeight / 2 - 5, Console.WindowWidth - 14)); flowersSR.Add(new Flowers(MaxHeight / 2 - 11, Console.WindowWidth - 14)); nextElementFl = randGen.Next(38, 47); counterFl = 0; } Console.SetCursorPosition(20, 20); // Console.Write(counter); // frog on flowers onElement = FrogFallsFromTheFlower(flowersFR, frog, onElement); onElement = FrogFallsFromTheFlower(flowersSR, frog, onElement); } if (frog.Row < MainProgram.MaxHeight / 2 && !onElement) { //Ends game frog.Coll = Console.WindowWidth / 2; frog.Row = Console.WindowHeight - 2; frog.Lives--; Sounds.End(); Console.Clear(); Sounds.OverTheGameSound(); FrogHome home = new FrogHome(); home.RenderOnPosition(0, 5); } }
static void Main(string[] args) { Console.BufferHeight = Console.WindowHeight = MaxHeight; Console.BufferWidth = Console.WindowWidth = MaxWidth; // main screen DrawingScreen.DrawMainScreen(); Console.Clear(); FrogHome home = new FrogHome(); home.RenderOnPosition(0, 5); // main engine Engine(); }
private static void FrogOverTheRiverMainLogic(List<Tree> treesFR, List<Tree> treesSR, List<Tree> treesTR, List<Flowers> flowersFR, List<Flowers> flowersSR, Random randGen, ref int nextElementFl, ref int counterFl, int slower, Frog frog, ref bool onElement) { // frog on islands onElement = FrogOnTree(treesFR, frog, onElement); onElement = FrogOnTree(treesSR, frog, onElement); onElement = FrogOnTree(treesTR, frog, onElement); //Flower move onElement = FrogOnFlower(flowersFR, frog, onElement); onElement = FrogOnFlower(flowersSR, frog, onElement); if (slower % 2 == 0) { if (flowersFR.Count < 3 && counterFl == nextElementFl) { flowersFR.Add(new Flowers(MaxHeight / 2 - 5, Console.WindowWidth - 14)); flowersSR.Add(new Flowers(MaxHeight / 2 - 11, Console.WindowWidth - 14)); nextElementFl = randGen.Next(38, 47); counterFl = 0; } Console.SetCursorPosition(20, 20); // Console.Write(counter); // frog on flowers onElement = FrogFallsFromTheFlower(flowersFR, frog, onElement); onElement = FrogFallsFromTheFlower(flowersSR, frog, onElement); } if (frog.Row < MainProgram.MaxHeight / 2 && !onElement) { //Ends game frog.Coll = Console.WindowWidth / 2; frog.Row = Console.WindowHeight - 2; frog.Lives--; Sounds.End(); Console.Clear(); Sounds.OverTheGameSound(); FrogHome home = new FrogHome(); home.RenderOnPosition(0, 5); } }