コード例 #1
0
ファイル: PlayerScore.cs プロジェクト: cahurley/codewars
 public PlayerScore(Framework framework)
 {
     InitializeComponent();
     this.framework = framework;
 }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: cahurley/codewars
        private void MainWindow_Load(object sender, EventArgs e)
        {
            // initialize engine
            GameFramework = new Framework(this);

            // restore windows
            using (RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Windward Studios\Windwardopolis\windows"))
                if (key != null)
                {
                    // only restore if matches
                    int cx = (int) key.GetValue("desktop-cx");
                    int cy = (int) key.GetValue("desktop-cy");
                    if ((cx == Screen.PrimaryScreen.WorkingArea.Width) && (cy == Screen.PrimaryScreen.WorkingArea.Height))
                    {
                        RestoreWindow(this, "main");
                        FormWindowState state;
                        Point location;
                        Size size;
                        RestoreWindow(key, "scoreboard", out state, out location, out size);
                        if (state != FormWindowState.Minimized)
                            CreateOrActivateScoreboard();
                        RestoreWindow(key, "status", out state, out location, out size);
                        if (state != FormWindowState.Minimized)
                            CreateOrActivateStatus();
                    }

                    GameFramework.MovesPerSecond = (int) key.GetValue("game-speed", GameFramework.MovesPerSecond);

                    toolStripMenuItemCoordinates.Checked = Convert.ToBoolean(key.GetValue("display-coordinates", "false"));
                    toolStripMenuItemLimoShadow.Checked = Convert.ToBoolean(key.GetValue("display-shadow", "false"));
                    toolStripMenuItemLimoShadowAll.Checked = Convert.ToBoolean(key.GetValue("display-shadow-all", "false"));

                    GameFramework.DebugStartMode = Convert.ToBoolean(key.GetValue("run-debug", "false"));
                    GameFramework.PlaySounds = Convert.ToBoolean(key.GetValue("play-sounds", "true"));
                }

            DebugCheckEnable();
            MuteBitmap();

            mapDisplay.DisplayCoordinates = toolStripMenuItemCoordinates.Checked;
            mapDisplay.DisplayShadows = toolStripMenuItemLimoShadow.Checked;
            mapDisplay.DisplayShadowsAll = toolStripMenuItemLimoShadowAll.Checked;

            PixelsPerTile = 24;
            toolStripMenuItemZoom100.Checked = true;
            mapDisplay.ZoomChanged();

            UpdateMap();
            UpdatePlayers();
            UpdateMenu();
        }
コード例 #3
0
ファイル: RemoteAI.cs プロジェクト: cahurley/codewars
 public RemoteAI(Framework framework, string guid)
 {
     this.framework = framework;
     TcpGuid = guid;
 }