Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. namespace Homework9
  2. {
  3.  
  4. class Cell
  5. {
  6. public bool checker;
  7. private string color;
  8.  
  9. private string column_row;
  10.  
  11.  
  12. }
  13.  
  14. class Program
  15. {
  16. static void Main(string[] args)
  17. {
  18. Cell cell = new Cell();
  19.  
  20. string Next_move = "Y";
  21. do
  22. {
  23. string[,] game_field2 = new string[9, 9];
  24. string[,] game_field1 = new string[9, 9]{ {" 8 "," "," # "," "," # "," "," # "," "," # "},
  25. {" 7 "," # "," "," # "," "," # "," "," # "," "},
  26. {" 6 "," "," # "," "," # "," "," # "," "," # "},
  27. {" 5 "," "," "," "," "," "," "," "," "},
  28. {" 4 "," "," "," "," "," "," "," "," "},
  29. {" 3 "," @ "," "," @ "," "," @ "," "," @ "," "},
  30. {" 2 "," "," @ "," "," @ "," "," @ "," "," @ "},
  31. {" 1 "," @ "," "," @ "," "," @ "," "," @ "," "},
  32. {" "," A "," B "," C "," D "," E "," F "," G "," H "},
  33. };
  34.  
  35. Console.Clear();
  36. Console.SetCursorPosition(0, 0);
  37. for (int i = 0; i < game_field1.GetLength(0); i++)
  38. { for (int j = 0; j < game_field1.GetLength(1); j++ )
  39. { Console.Write(game_field1[i, j]); }
  40. Console.WriteLine();
  41. }
  42. var temp = game_field1;
  43. game_field1 = game_field2;
  44. game_field2 = temp;
  45. Thread.Sleep(250);
  46.  
  47. Console.WriteLine();
  48. Console.Write("Mext move: Y/N ? ");
  49. Next_move = Console.ReadLine();
  50.  
  51. if (Next_move == "Y" || Next_move == "y")
  52. {
  53. string cell_temp1, cell_temp2;
  54. Console.Write("Input checker you want move"); // Make move A3
  55. cell_temp1 = Console.ReadLine();
  56.  
  57. Console.Write("Input place you want to move"); // Move to B4
  58. cell_temp2 = Console.ReadLine();
  59.  
  60. cell2 = cell1;
  61. }
  62. else
  63. break;
  64. }
  65.  
  66. while (Next_move == "Y");
  67.  
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement