NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication18
{
class Program
{

static void Main(string[] args)
{
Random rnd = new Random();

int silahSec, avciHasar = 0;
int rakipSec = zarAt(3);
string rakipAd = " ";
int atak = 0, hasar = 0;
int rakipCan = 0,

rakipZirh = 0, rakipHasar = 0;
int avciCan = 25, avciZırh = 14;
do
{
Console.WriteLine("Silah Seçimi");
Console.WriteLine("_______________");
Console.WriteLine("[1]Bıçak(d4)");
Console.WriteLine("[2]Kılıç(d8)");
Console.WriteLine("[3]Ok - Yay(d6)");
Console.WriteLine("[4]Balta(d10)");
Console.WriteLine("[5]Balyoz(d12)");

Console.WriteLine("Silah Seçiniz : [1][2][3][4][5]");
silahSec = Convert.ToInt16(Console.ReadLine());
}
while (silahSec < 0 ||silahSec > 6);

switch (silahSec)
{
case 1: avciHasar = 4; break;
case 2: avciHasar = 8; break;
case 3: avciHasar = 6; break;
case 4: avciHasar = 10; break;
case 5: avciHasar = 12; break;
default: avciHasar = 1; break;
}
switch (rakipSec)
{
case 1:rakipAd ="Kurt"; rakipCan = 10; rakipZirh = 11; rakipHasar = 4; break;
case 2:rakipAd ="Domuz"; rakipCan = 14; rakipZirh = 16;rakipHasar = 3; break;
case 3: rakipAd = "Ayı"; rakipCan = 25; rakipZirh = 14;rakipHasar = 6; break;
default: break;
}
Console.WriteLine(rakipAd);
do
{
{
Console.WriteLine("Avcı saldırıyor");
}
atak = zarAt(20);

hasar = AvcıSaldir(atak, rakipZirh, avciHasar);
rakipCan -= hasar;
Console.WriteLine("Atak = {0} Hasar = {1} Rakip Can = {2} ", atak, hasar, rakipCan);

Console.ReadLine();
if (rakipCan <= 0)
{
Console.WriteLine("Avcı kazandı");
Console.ReadLine();
}
else
{
{

Console.WriteLine("Rakip saldırıyor");

}

atak = zarAt(20);


hasar = rakipSaldir(atak, avciZırh, rakipHasar);
avciCan -= hasar;
Console.WriteLine("Atak = {0} Hasar = {1} Avcı Can: {2}", atak, hasar, avciCan);

Console.ReadLine();

if (avciCan <= 0)
{
Console.WriteLine("Rakip kazandı");
Console.ReadLine();

}
}
}
while (avciCan > 0 && rakipCan > 0);
}
public static int AvcıSaldir(int atak, int zirh, int hasar)
{
int x;
// atak = zarAt(20);
if (atak > zirh)
{
x = zarAt(hasar);
}
else x = 0;
return x;
}
public static int rakipSaldir(int atak, int zirh, int hasar)
{
int x;
//atak = zarAt(20);
if (atak > zirh)
{
x = zarAt(hasar);
}
else x = 0;
return x;
}
public static int zarAt(int a)
{
Random rnd = new Random();
int x = rnd.Next(1, a +1);
return x;
}


}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.