/* קלט: תיאור לוח משחק בן 30 משבצות ומיקום משבצת שעליה מוצב שחקן (בין 1 ל-24) פלט: הטלות קובייה המביאות את השחקן למשבצת פנויה */ using System; public class MineBoardGame { public static void Main() { // הגדרת קבוע const int BOARD_SIZE = 10; // הגדרת משתנים bool[] board = new bool[BOARD_SIZE]; char cellStatus; int pawn; // קלט הלוח Console.WriteLine("Enter the board details: Type F for a cell with a mine, and T for a free cell: "); for (int i = 0; i < board.Length; i++) { Console.Write("Enter status of cell number {0}: ", i + 1); cellStatus = char.Parse(Console.ReadLine()); board[i] = (cellStatus == 'T'); } // קלט מיקום השחקן והתאמתו לאופן שמירת הלוח Console.Write("Enter the pawn position: "); pawn = int.Parse(Console.ReadLine()); pawn = pawn - 1; // פלט Console.Write("Throws that lead to empty positions: "); for (int i = 1; i <= 6; i++) if (board[pawn + i]) Console.Write("{0} ", i); }// Main } //class MineBoardGame