𓀠𓀒𓀡𓀬
𓀠𓀒𓀡𓀬
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
public void drink(int meter)
{
// we should be able to drink
int meters = meter;
Random random = new Random();
int drink = random.Next(1, 50);
if (drink >= 1 && drink <= 10 && meters >= 1 && meters <= 15)
{
Console.WriteLine();
Console.WriteLine("you have not been walking for quite long and found some water (water goes up by 5)");
Console.WriteLine();
water += 5;
}
else if (drink > 10 && drink <= 20 && meters > 15 && meters <= 30)
{
Console.WriteLine();
Console.WriteLine("you have not been walking for quite long and found some water (water goes up by 10)");
Console.WriteLine();
water += 10;
}
else if (drink > 20 && drink <= 30 && meters > 30 && meters <= 45)
{
Console.WriteLine();
Console.WriteLine("you have not been walking for quite long and found some water (water goes up by 15)");
Console.WriteLine();
water += 15;
}
else if (drink > 30 && drink <= 40 && meters > 45 && meters <= 60)
{
Console.WriteLine();
Console.WriteLine("you have been walking for quite long and found some water (water goes up by 20)");
Console.WriteLine();
water += 20;
}
else if (drink > 40 && drink <= 50 && meters > 60 && meters <= 75)
{
Console.WriteLine();
Console.WriteLine("you have been walking for quite long and found some water (water goes up by 25)");
Console.WriteLine();
water += 25;
}
}
public void drink(int meter)
{
// we should be able to drink
int meters = meter;
Random random = new Random();
int drink = random.Next(1, 50);
if (drink >= 1 && drink <= 10 && meters >= 1 && meters <= 15)
{
Console.WriteLine();
Console.WriteLine("you have not been walking for quite long and found some water (water goes up by 5)");
Console.WriteLine();
water += 5;
}
else if (drink > 10 && drink <= 20 && meters > 15 && meters <= 30)
{
Console.WriteLine();
Console.WriteLine("you have not been walking for quite long and found some water (water goes up by 10)");
Console.WriteLine();
water += 10;
}
else if (drink > 20 && drink <= 30 && meters > 30 && meters <= 45)
{
Console.WriteLine();
Console.WriteLine("you have not been walking for quite long and found some water (water goes up by 15)");
Console.WriteLine();
water += 15;
}
else if (drink > 30 && drink <= 40 && meters > 45 && meters <= 60)
{
Console.WriteLine();
Console.WriteLine("you have been walking for quite long and found some water (water goes up by 20)");
Console.WriteLine();
water += 20;
}
else if (drink > 40 && drink <= 50 && meters > 60 && meters <= 75)
{
Console.WriteLine();
Console.WriteLine("you have been walking for quite long and found some water (water goes up by 25)");
Console.WriteLine();
water += 25;
}
}
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
this is the actualfunction:
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
Console.WriteLine("Would you like to play a little game with your parrot kind otherwise 'q' to quit:");
string user_second = Console.ReadLine().ToLower();
while (true)
{
if (user.Length > 1)
{
int move_meter = 0;
for (int i = 0; i < 2; i++)
{
Console.WriteLine();
Console.WriteLine("do you want to fly or walk");
string move = Console.ReadLine().ToLower();

if (move == "fly")
{
int user_fly = birds[birds.Length -1].Fly();
move_meter += user_fly;


}
else if (move == "walk")
{
int user_walk = birds[birds.Length -1].Walk();
move_meter += user_walk;
}

}
birds[birds.Length -1].eat(move_meter);
Console.WriteLine(birds[birds.Length -1].name);
Console.WriteLine(birds[birds.Length -1].food);
Console.WriteLine(birds[birds.Length -1].water);
Console.WriteLine(birds[birds.Length -1].health);
Console.WriteLine();
birds[birds.Length - 1].drink(move_meter);
Console.WriteLine(birds[birds.Length - 1].name);
Console.WriteLine(birds[birds.Length - 1].food);
Console.WriteLine(birds[birds.Length - 1].water);
Console.WriteLine(birds[birds.Length - 1].health);
Console.WriteLine();
}
Console.WriteLine("Would you like to play a little game with your parrot kind otherwise 'q' to quit:");
string user_second = Console.ReadLine().ToLower();
while (true)
{
if (user.Length > 1)
{
int move_meter = 0;
for (int i = 0; i < 2; i++)
{
Console.WriteLine();
Console.WriteLine("do you want to fly or walk");
string move = Console.ReadLine().ToLower();

if (move == "fly")
{
int user_fly = birds[birds.Length -1].Fly();
move_meter += user_fly;


}
else if (move == "walk")
{
int user_walk = birds[birds.Length -1].Walk();
move_meter += user_walk;
}

}
birds[birds.Length -1].eat(move_meter);
Console.WriteLine(birds[birds.Length -1].name);
Console.WriteLine(birds[birds.Length -1].food);
Console.WriteLine(birds[birds.Length -1].water);
Console.WriteLine(birds[birds.Length -1].health);
Console.WriteLine();
birds[birds.Length - 1].drink(move_meter);
Console.WriteLine(birds[birds.Length - 1].name);
Console.WriteLine(birds[birds.Length - 1].food);
Console.WriteLine(birds[birds.Length - 1].water);
Console.WriteLine(birds[birds.Length - 1].health);
Console.WriteLine();
}
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
this is where it should do the function which is not happing for some reason in this case its the drink function
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
here is the code
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
No description
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ my program is acting weird
this is the output: (its not doing the second method for some reason)
11 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
nvm i found the solution
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
0o0
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
i need the user one only
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
in the second for loop
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
'but how do i call that object agian
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
so in the first for leep it goes true all parrots incuding the user and create an object of all of them
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
its about this piece
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
static void Main(string[] args)
{
while (true)
{
Console.WriteLine("Please enter your parrot kind or 'q' to quit:");
string user = Console.ReadLine();
if (user.Length > 1)
{
Random random = new Random();
string[] parrots = { "Parrot", "Ara", "Sun conure", "Lovebird", "Cockatoo", "Macaws", "Lorikeets", "Scarlet Macaw", "Kākāpō", "Parakeets", "Senegal parrot", "Caiques", "Amazon parrot", "Parrotlet", "Burrowing parrot", "Cockatiel", "African Grey", "Eclectus", "Pionus parrot", "Budgerigar", "African Greys", user };
string[] colors = { "Blue", "Red", "Green" };
Bird[] birds = new Bird[parrots.Length];
for (int i = 0; i < parrots.Length; i++)
{
int num = random.Next(1000, 20000);
int start = random.Next(0, colors.Length);

birds[i] = new Bird(parrots[i], colors[start], num);
Console.WriteLine(birds[i]);
Console.WriteLine(birds[i].name);
Console.WriteLine(birds[i].color);
Console.WriteLine(birds[i].amount);
Console.WriteLine();
}
for (int i = 0; i < 2; i++)
{
Console.WriteLine("do you want to fly or walk");
string move = Console.ReadLine().ToLower();

if (move == "fly")
{
string userParrot = parrots[parrots.Length - 1];


}
else if (move == "walk")
{
string userParrot = parrots[parrots.Length - 1];
}

}
}
else if (user == "q")
{
break;
}
}
}
static void Main(string[] args)
{
while (true)
{
Console.WriteLine("Please enter your parrot kind or 'q' to quit:");
string user = Console.ReadLine();
if (user.Length > 1)
{
Random random = new Random();
string[] parrots = { "Parrot", "Ara", "Sun conure", "Lovebird", "Cockatoo", "Macaws", "Lorikeets", "Scarlet Macaw", "Kākāpō", "Parakeets", "Senegal parrot", "Caiques", "Amazon parrot", "Parrotlet", "Burrowing parrot", "Cockatiel", "African Grey", "Eclectus", "Pionus parrot", "Budgerigar", "African Greys", user };
string[] colors = { "Blue", "Red", "Green" };
Bird[] birds = new Bird[parrots.Length];
for (int i = 0; i < parrots.Length; i++)
{
int num = random.Next(1000, 20000);
int start = random.Next(0, colors.Length);

birds[i] = new Bird(parrots[i], colors[start], num);
Console.WriteLine(birds[i]);
Console.WriteLine(birds[i].name);
Console.WriteLine(birds[i].color);
Console.WriteLine(birds[i].amount);
Console.WriteLine();
}
for (int i = 0; i < 2; i++)
{
Console.WriteLine("do you want to fly or walk");
string move = Console.ReadLine().ToLower();

if (move == "fly")
{
string userParrot = parrots[parrots.Length - 1];


}
else if (move == "walk")
{
string userParrot = parrots[parrots.Length - 1];
}

}
}
else if (user == "q")
{
break;
}
}
}
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/22/2024 in #help
✅ hi im trying to make the bird walk and fly if user say so
10 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/21/2024 in #help
✅ is there anything wrong with how i used $"{}" ???
i will look tommorrow if i can find anything good rn now im tryna do open source
15 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/21/2024 in #help
✅ is there anything wrong with how i used $"{}" ???
that looks quite advanced
15 replies
CC#
Created by 𓀠𓀒𓀡𓀬 on 2/21/2024 in #help
✅ is there anything wrong with how i used $"{}" ???
damn
15 replies