private void changeColorButton(Square square, Button button) { button.BackColor = square.ColourLit; refresh(); pause(); button.BackColor = square.Colour; refresh(); pause(); }
private Square getSquare(int num) { Square square = null; switch (num) { case 1: square = new Square("btnRed", Color.RosyBrown, Color.Red); break; case 2: square = new Square("btnGreen", Color.Green, Color.LimeGreen); break; case 3: square = new Square("btnBlue", Color.DarkBlue, Color.Blue); break; case 4: square = new Square("btnYellow", Color.Olive, Color.Yellow); break; } return square; }
public Square getSquare(String name) { Square square = null; switch (name) { case "btnRed": square = new Square("btnRed", Color.RosyBrown, Color.Red); break; case "btnGreen": square = new Square("btnGreen", Color.Green, Color.LimeGreen); break; case "btnBlue": square = new Square("btnBlue", Color.DarkBlue, Color.Blue); break; case "btnYellow": square = new Square("btnYellow", Color.Olive, Color.Yellow); break; } return square; }