Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Again_of_lesson_16th_February_2022
- {
- class Program
- {
- public static void Main()
- {
- string[] move = { "_", "_", "_" };
- while (true)
- {
- for (int i = 0; i < 3; i++)
- {
- Console.WriteLine(move[i]);
- }
- Console.WriteLine(move);
- Console.WriteLine("Enter your move, 0 to 2");
- int input = Convert.ToInt32(Console.ReadLine());
- if (move[input] == "_")
- {
- move[input] = "X";
- }
- else
- {
- Console.WriteLine("Invalid move");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment