Advertisement
AtEchoOff

Tic Tac Toe Starter Code

Oct 8th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. using System;
  2. namespace Tic_Tac_Toe
  3. {
  4. class Program
  5. {
  6. static char[] arr = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
  7. static int player = 1;
  8. static int choice;
  9. static int flag = 0;
  10. static void Main(string[] args)
  11. {
  12. Board();
  13. }
  14. // Board method
  15. private static void Board()
  16. {
  17. Console.WriteLine(" | | ");
  18. Console.WriteLine(" {0} | {1} | {2}", arr[1], arr[2], arr[3]);
  19. Console.WriteLine("_____|_____|_____ ");
  20. Console.WriteLine(" | | ");
  21. Console.WriteLine(" {0} | {1} | {2}", arr[4], arr[5], arr[6]);
  22. Console.WriteLine("_____|_____|_____ ");
  23. Console.WriteLine(" | | ");
  24. Console.WriteLine(" {0} | {1} | {2}", arr[7], arr[8], arr[9]);
  25. Console.WriteLine(" | | ");
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement