public MultiplayerPage(GameSettings settings) { _settings = settings; var mode = new CustomMode(settings.BoardWidth, settings.BoardHeight, settings.Bomb); int playerWindowWidth = (int)(Constants.WINDOW_WIDTH * Constants.SCREENS_RATIO); _playerProps = new DrawingProperties( settings.BoardWidth, settings.BoardHeight, mode.SquareSize, playerWindowWidth ); _opponentProps = new DrawingProperties( settings.BoardHeight, settings.BoardWidth, Constants.OPPONENT_SQUARE_SIZE, (int)(Constants.WINDOW_WIDTH * (1 - Constants.SCREENS_RATIO))) { MarginLeftOffset = playerWindowWidth, IsRotated = true }; }
public GamePage(Mode mode) { _mode = mode; _stopWatch = new StopWatch(); _properties = new DrawingProperties(mode.Board.Width, mode.Board.Height, mode.SquareSize); }