Beispiel #1
0
        }// end of playGame1_V1

        static private void playGame1_V2()  //1
        {
            int result1 = 0;

            try                                                                             //2
            {
                GoodDice player1 = new GoodDice();                                          //3
                player1.Num    = 0;                                                         //4
                player1.Colour = "asedgfvfSDFDVSSDVsfvd£";                                  //4b
                player1.GenerateNumber();                                                   //4c
                result1 = player1.Num;                                                      //5
                Console.WriteLine("Player 1 rolled " + player1.Colour + " " + player1.Num); //5b
                Console.WriteLine("Player 1 rolled " + player1.ToString());                 //5c
            }
            catch (Exception e)
            {
                Console.WriteLine("Error " + e.Message);    //2b
            }
        }// end of playGame1_V2