אדם לאדם זאב: הבדלים בין גרסאות בדף
תוכן שנמחק תוכן שנוסף
מ שוחזר מעריכות של 212.179.174.233 (שיחה) לעריכה האחרונה של 94rain תגית: שחזור |
אין תקציר עריכה |
||
שורה 1: | שורה 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) |
|||
{ |
|||
===תרגום=== |
|||
for (int i = 0; i < loah.GetLength(0); i++) |
|||
* אנגלית: {{ת|אנגלית|man is a wolf to his fellow man}} |
|||
{ |
|||
* לטינית: {{ת|לטינית|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; |
|||
} |
גרסה מתאריך 15:10, 2 במאי 2019
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) {
} } public static bool IsEmpty(char[,] loah, int row, int line) { for (int i = 0; i < loah.GetLength(0); i++) { 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; }