I'm creating a Battleship Console App. I want the system to pick between a heavy attack or a minor attack at random so the player has a chance at winning and so does the system. Here is my code.
Player and Enemy Health are both set to '30'
public void eHeavyAttack()
{
Console.Clear();
Random r = new Random();
int rInt = r.Next(1, 7);
Player_Health = Player_Health - rInt;
Console.WriteLine("The enemy has dealt " + rInt + " damage!");
Console.WriteLine("Your health is now at " + Player_Health + " health!");
Console.ReadKey();
}
public void eMinorAttack()
{
Console.Clear();
Random r = new Random();
int rInt = r.Next(0, 4);
Player_Health = Player_Health - rInt;
Console.WriteLine("The enemy has dealt " + rInt + " damage!");
Console.WriteLine("Your health is now at " + Player_Health + " health!");
}