Esempio n. 1
0
    public static void Main(string[] args)
    {
        //Declare Monopoly instance
        string CurrentFP;

        Monopoly CurrGame = new Monopoly();

        CurrGame.NewPlayer("Dog", "Andrew")
        CurrGame.NewPlayer("Ship", "Fei")

        //Test
        Boardspace temp;

        temp = CurrGame.CurrBoard.GoSpace;
        Console.WriteLine("BEGIN TEST");
        do
        {
            Console.WriteLine(temp.SpaceName);
            Console.WriteLine(temp.SpaceType);
            Console.WriteLine(temp.GetType());
            temp = temp.Next;
            if (temp is TitleProperty)
            {
                Console.WriteLine(temp is TitleProperty);
                TitleProperty tempTitle = (TitleProperty)temp;
                Console.WriteLine(tempTitle.Rent);
            }
        }while (temp.SpaceName != CurrGame.CurrBoard.GoSpace.SpaceName);
    }