public Board(CoordHelper.EProfile pt, Vector2 size) : base(App.Game) { playerType = pt; this.size = size; pos = new Rectangle((int)(CoordHelper.Instance.getLeftMargin(playerType)), (int)(Constants.Measures.upBoardMargin), (int)(size.X * Constants.Measures.blockSize), (int)(size.Y * Constants.Measures.blockSize)); grid = new Block[(int)size.Y][]; limitLineHeight = 4; for (int i = 0; i < grid.Length; i++) { grid[i] = new Block[(int)size.X]; for (int j = 0; j < (int)size.X; j++) grid[i][j] = null; } if (SettingsManager.Instance.Device != SettingsManager.EDevice.SURFACE) { Constants.Measures.leftBoardMargin = (Constants.Measures.portraitWidth - Constants.Measures.boardWidth) / 2; } }
public Vector2 getNextValue(EProfile eProfile, Block b) { if (eProfile == EProfile.ONEPLAYER) return new Vector2(CoordHelper.Instance.getLeftMargin(eProfile) + (b.PosRel.X + 10.5f) * Constants.Measures.blockSize, Constants.Measures.upBoardMargin + (b.PosRel.Y + 1.5f) * Constants.Measures.blockSize); return new Vector2(CoordHelper.Instance.getLeftMargin(eProfile) - nextBoxW - Constants.Measures.borderSize + (b.PosRel.X + 0.5f) * Constants.Measures.blockSize, Constants.Measures.upBoardMargin + (b.PosRel.Y + 1.5f) * Constants.Measures.blockSize); }