אדם לאדם זאב: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
אין תקציר עריכה
אין תקציר עריכה
שורה 1:
==אָדָם לְאָדָם זְאֵב==
bool win = false;
# אדם מתנהג לאדם אחר כזאב מטבעו, אדם חשדן כלפי רעהו ושואף לפגוע בו.
char[,] loah = new char[3, 3];
#:* הוא הצהיר מספר פעמים שאילו היה יכול, היה פוגע בכל מי שסביבו. על כך נאמר: '''אדם לאדם זאב'''.
for (int i = 0; i < loah.GetLength(0); i++)
{
for (int j = 0; j < loah.GetLength(1); j++)
{
loah[i, j] = '@';
}
}
while (win == false)
{
 
===מקור===
}
# {{שאילה|לטינית}} homo homini lupus est. את הפתגם טבע לראשונה המחזאי פלאוטוס בתקופת הרפובליקה הרומית.
}
 
public static bool IsEmpty(char[,] loah, int row, int line)
===תרגום===
{
* אנגלית: {{ת|אנגלית|man is a wolf to his fellow man}}
for (int i = 0; i < loah.GetLength(0); i++)
* לטינית: {{ת|לטינית|homo homini lupus est}}
{
for (int j = 0; j < loah.GetLength(1); j++)
===ראו גם===
{
* [[זאב]]
if (loah[row, line] == '@')
 
return false;
[[קטגוריה:ניבים, ביטויים ופתגמים]]
}
[[קטגוריה:פתגמים]]
}
[[קטגוריה:פסיכומטרי]]
return true;
[[קטגוריה:תרגומי שאילה מהשפה הלטינית]]
}
public static bool Win(char[,] loah)
{
int sum = 0;
Console.WriteLine("X plays now");
Console.WriteLine("choose the line");
int line = int.Parse(Console.ReadLine());
Console.WriteLine("choose row");
int row = int.Parse(Console.ReadLine());
if (IsEmpty(loah, line, row) == false)
{
Console.WriteLine("This is Full");
while (IsEmpty(loah, line, row) == false)
{
Console.WriteLine("choose the line");
line = int.Parse(Console.ReadLine());
Console.WriteLine("choose row");
row = int.Parse(Console.ReadLine());
if (IsEmpty(loah, line, row) == true)
Console.WriteLine("You've done your turn");
}
}
if (sora(loah) || amoda(loah) || alhson(loah))
{
return true;
Console.WriteLine("X won");
}
Console.WriteLine("O plays now");
Console.WriteLine("choose the line");
line = int.Parse(Console.ReadLine());
Console.WriteLine("choose row");
row = int.Parse(Console.ReadLine());
if (IsEmpty(loah, line, row) == false)
{
Console.WriteLine("This is Full");
while (IsEmpty(loah, line, row) == false)
{
Console.WriteLine("choose the line");
line = int.Parse(Console.ReadLine());
Console.WriteLine("choose row");
row = int.Parse(Console.ReadLine());
if (IsEmpty(loah, line, row) == true)
Console.WriteLine("You've done your turn");
}
}
return false;
}