ConsoleUI/GameEngine.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace ConsoleUI
{
    using System;
    using System.Threading;
    using SuperMario;
    using SuperMario.Characters;
    using SuperMario.Characters.Players;
    using SuperMario.Weapons;
    using SuperMario.Interfaces;

    class GameEngine
    {
        private ConsoleKeyInfo keyInfo;
        private GamePlayground playground;
        private Game game;

        public GameEngine(GamePlayground playground, Game game)
        {
            this.Playground = playground;
            this.Game = game;
            this.Game.IsRunning = true;
            this.IsShootingRight = true;

            //First two and last two columns of map are saved for borders.
            this.RightBorder = playground.Map.Width - 3;
            this.LeftBorder = 2;
        }

        public GamePlayground Playground
        {
            get
            {
                return this.playground;
            }

            private set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("playground", "Playground can not be null");
                }

                this.playground = value;
            }
        }

        public Game Game
        {
            get
            {
                return this.game;
            }

            private set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("game", "Game can not be null");
                }

后面还有 345 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。