Пример #1
0
        static void Main(string[] args)
        {

            int numberOfPlayers;

            NumberOfPlayers numberofplayers = new NumberOfPlayers();
            Player1 player1 = new Player1();
            Player2 player2 = new Player2();
            PlayerChooseSign signChoice = new PlayerChooseSign();
            CheckPlayerWin checkplayerwin = new CheckPlayerWin();
            UserPickNumberOfPlayers userpicknumberofplayers = new UserPickNumberOfPlayers();
            UserPickHandSign userpickhandsign = new UserPickHandSign();
            DisplayResults displayresults = new DisplayResults();
            WriteToDocument writetodocument = new WriteToDocument();
            ReadFromDocument readfromdocument = new ReadFromDocument();

            readfromdocument.writeDocumentContent();

            numberOfPlayers = userpicknumberofplayers.pickNumberOfPlayers(player1, player2, numberofplayers);

            userpickhandsign.pickHandSign(numberOfPlayers, checkplayerwin, signChoice, player1, player2);
           
            checkplayerwin.getResult();

            displayresults.DisplayWinner(player1, player2, checkplayerwin);

            checkplayerwin.SignClassOutput();

            writetodocument.writeTextToDocument(player1, player2);
        }
 public void pickHandSign(int numberOfPlayers, CheckPlayerWin checkplayerwin,PlayerChooseSign signChoice, Player1 player1, Player2 player2) {
     switch (numberOfPlayers)
     {
         case 1:
             checkplayerwin.player1sign = signChoice.getPlayerHandsign();
             checkplayerwin.player2sign = rnd.Next(5);
             break;
         case 2:
             Console.WriteLine(player1.Player1Name + " it's your turn!");
             checkplayerwin.player1sign = signChoice.getPlayerHandsign();
             Console.Clear();
             Console.WriteLine(player2.Player2Name + " it's your turn!");
             checkplayerwin.player2sign = signChoice.getPlayerHandsign();
             Console.Clear();
             break;
     }
 }