public static void SetUpBoard() { gameBoard[START_SQUARE] = new Square("Start", START_SQUARE); gameBoard[FINISH_SQUARE] = new Square("Finish", FINISH_SQUARE); for (int i = 1; i < FINISH_SQUARE; i++ ) { if (i % 10 == 0) { gameBoard[i] = new Lose_Square(i.ToString(), i); } else if (i % 5 == 0) { gameBoard[i] = new Win_Square(i.ToString(), i); } else if (i % 6 == 0) { gameBoard[i] = new Chance_Square(i.ToString(), i); } else { gameBoard[i] = new Square(i.ToString(), i); } } }
public SquareControl(Square square, BindingList<Player> players) { this.square = square; this.players = players; // Set GUI properties of the whole square. Size = new Size(SQUARE_SIZE, SQUARE_SIZE); Margin = new Padding(0); // No spacing around the cell. (Default is 3 pixels.) Dock = DockStyle.Fill; BorderStyle = BorderStyle.FixedSingle; BackColor = Color.CornflowerBlue; SetImageWhenNeeded(); }
public void SetLocation(Square location) { this.location = location; }
public Player(string name, Square location) { this.name = name; this.location = location; }