Silk&Song
Silk&Song
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
though i know how to make them
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
breaks code since i dont really know how to implement classes
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
Ok when do you use classes
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
ok im going to tdo that and see if i get errors
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
so how do you do that
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
I dont know how to do that
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
how will the ennemy defend when its in antoher function and idk if the turns will work
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
then do I put the player attack and the enemy attack in the same function?
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
this code
else if (enemyChoice == 1)
{
if (enemyDefendTR <= 0 & enemyCooldown == 0)
{
enemyDefendTR += 2;
enemyDefense += 2;
Console.WriteLine("The enemy defended and gained 2 defense points!");
Console.ReadKey();
}
else if (enemyDefendTR >= 1 | enemyCooldown == 1)
{
Console.WriteLine($"The enemy attacked and dealt {enemyAttack} damage to you! ");
yourHealth -= enemyAttack - playerDefense;
Console.ReadKey();
if (playerDefenseTR > 0)
{
playerDefenseTR--;

}
else if (playerDefenseTR >= 0)
{

}
else if (enemyChoice == 1)
{
if (enemyDefendTR <= 0 & enemyCooldown == 0)
{
enemyDefendTR += 2;
enemyDefense += 2;
Console.WriteLine("The enemy defended and gained 2 defense points!");
Console.ReadKey();
}
else if (enemyDefendTR >= 1 | enemyCooldown == 1)
{
Console.WriteLine($"The enemy attacked and dealt {enemyAttack} damage to you! ");
yourHealth -= enemyAttack - playerDefense;
Console.ReadKey();
if (playerDefenseTR > 0)
{
playerDefenseTR--;

}
else if (playerDefenseTR >= 0)
{

}
attacks in else if because I gave them a defense cooldown so if it it selects defense again it will still attack so should i still put that in the defense fuction?
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
im going to put teh attack and defend in there own functions but i feel like its going to cause errors
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
so its just making steps to solve a problem and transfering the steps to code?
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
it seems to be much more complex that that
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
yes
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
ngl I dont really understand algorithims at all
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
its teaching abstraction next
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
I did in codeacademy
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
But im planning to add more to it
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
no
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
no
79 replies
CC#
Created by Silk&Song on 2/20/2025 in #help
What parts of these should i put in functions?
could you show an example
79 replies