Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Homework9
- {
- class Cell
- {
- public bool checker;
- private string color;
- private string column_row;
- }
- class Program
- {
- static void Main(string[] args)
- {
- Cell cell = new Cell();
- string Next_move = "Y";
- do
- {
- string[,] game_field2 = new string[9, 9];
- string[,] game_field1 = new string[9, 9]{ {" 8 "," "," # "," "," # "," "," # "," "," # "},
- {" 7 "," # "," "," # "," "," # "," "," # "," "},
- {" 6 "," "," # "," "," # "," "," # "," "," # "},
- {" 5 "," "," "," "," "," "," "," "," "},
- {" 4 "," "," "," "," "," "," "," "," "},
- {" 3 "," @ "," "," @ "," "," @ "," "," @ "," "},
- {" 2 "," "," @ "," "," @ "," "," @ "," "," @ "},
- {" 1 "," @ "," "," @ "," "," @ "," "," @ "," "},
- {" "," A "," B "," C "," D "," E "," F "," G "," H "},
- };
- Console.Clear();
- Console.SetCursorPosition(0, 0);
- for (int i = 0; i < game_field1.GetLength(0); i++)
- { for (int j = 0; j < game_field1.GetLength(1); j++ )
- { Console.Write(game_field1[i, j]); }
- Console.WriteLine();
- }
- var temp = game_field1;
- game_field1 = game_field2;
- game_field2 = temp;
- Thread.Sleep(250);
- Console.WriteLine();
- Console.Write("Mext move: Y/N ? ");
- Next_move = Console.ReadLine();
- if (Next_move == "Y" || Next_move == "y")
- {
- string cell_temp1, cell_temp2;
- Console.Write("Input checker you want move"); // Make move A3
- cell_temp1 = Console.ReadLine();
- Console.Write("Input place you want to move"); // Move to B4
- cell_temp2 = Console.ReadLine();
- cell2 = cell1;
- }
- else
- break;
- }
- while (Next_move == "Y");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement