示例#1
0
        static void Main(string[] args)
        {
            Game game = new Cricket();

            game.play();
            Console.WriteLine();
            game = new Football();
            game.play();
        }
示例#2
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     // TODO: use this.Content to load your game content here
     Assets.LoadContent(Content);
     Assets.CreatePixel(GraphicsDevice);
     football = new Football();
     c        = new Competitor(football);
     p        = new Player();
 }
示例#3
0
        public static void Demo()
        {
            Football f = new Football();

            f.Play();

            Baseball b = new Baseball();

            b.Play();
            Console.Read();
        }
示例#4
0
        static void Main(string[] args)
        {
            Game game = new Racing();

            game.play();
            Console.WriteLine();

            game = new Basketball();
            game.play();
            Console.WriteLine();

            game = new Football();
            game.play();

            Console.Read();
        }