Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer questions 4, 5, 6, & 7 ONLY. ASSUME THERE ARE NO SYNTAX ERRORS. st

ID: 3696584 • Letter: P

Question

Please answer questions 4, 5, 6, & 7 ONLY. ASSUME THERE ARE NO SYNTAX ERRORS.

string[] myBoard = { "redChecker", "redChecker", "blankSpace", "blankSpace", "blankSpace", "blueChecker", "blueChecker" };

string[] buttons = { "button00", "button01", "button02", "button03", "button04", "button05", "button06" };

string selectedChecker = "";

string currentButton = "";

private void Form1_Load(object sender, EventArgs e)

{

displayBoard();

}

public void displayBoard()

{

for (int I = 0; I < myBoard.Length; I++)

{ foreach (var control in checkerBoard.Controls) // every object on your form is contained in a Controls array automatically created

{

var button = control as Button;

if (button != null) // I found a button

{

if (button.Name == buttons[I]) // I found the button I am looking for

{

if (myBoard[I] == "redChecker")

{

button.BackColor = System.Drawing.Color.Red;

}

else if (myBoard[I] == "blueChecker")

{

button.BackColor = System.Drawing.Color.Blue;

}

else if (myBoard[I] == "blueKing")

{

button.BackColor = System.Drawing.Color.BlueViolet;

}

else if (myBoard[I] == "redKing")

{ button.BackColor = System.Drawing.Color.Tomato;

} else

{ button.BackColor = System.Drawing.Color.Gray

; }

break;

}

}

QUESTION 4: WHAT CHANGES WOULD NEED TO BE MADE TO THIS PROGRAM TO HANDLE A FULL SIZE CHECKERBOARD?

QUESTION 5: Explain what logic (don't show code) you would use to determine if someone won the checkers game. Relate your answer to the code shown in question4. For example, explain how you would use the array(s) to determine who won.Also, how would you determine if the game was a draw?

QUESTION 6: Using the code from question 4, explain the logic you would use to create a 'reset' button for the game. What code changes would this require. Do not show the actual coding, just explain what changes would be required.

QUESTION 7: Using the code from question 4, explain the logic you would use to create a function to keep score of how many times someone has won the game. Do not show code. Just explain the logic needed.

Explanation / Answer

4.In the above program u should add more spaces to complete ful sixe board as per the program u should change total program.

5.assume I, j and k take one int as won for ex I was won.

6.insert one button give name reset in designing page And write .obj.reset(redChecker.text, blueChecker.text, button1.....etc);

7.just take one extra button and2 labels and write winner on button and label one as no of tyms.when u click the button you will get the answer at label button but u have to care in code.