public Form1() { InitializeComponent(); gridFont = new Font("Arial", 10); string layout = File.ReadAllText("layout2.txt"); gameState = new ServerGameState(layout); #if DEBUG this.MinimumSize = new Size((gameState.BoardWidth * 16) + 10, (gameState.BoardHeight * 16) + 30); this.Size = new Size((gameState.BoardWidth * 32) + 10, (gameState.BoardHeight * 32) + 30); this.gameTimer.Interval = 3000; #else this.MinimumSize = new Size((gameState.BoardWidth * 8) + 10, (gameState.BoardHeight * 8) + 30); this.Size = new Size((gameState.BoardWidth * 8) + 10, (gameState.BoardHeight * 8) + 30); #endif this.StartPosition = FormStartPosition.CenterScreen; this.apiAccess = new Mutex(); }
public GameState(ServerGameState source, int playerIdx) : base(source) { this.events = new Events(source.playerEvents[playerIdx]); source.playerEvents[playerIdx].Clear(); }