Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C# and made in visual studio COMP-213 Visual Programming Assignment 2 Requirements Design a Puzzle-game program that will have a form with an array
In C# and made in visual studio
COMP-213 Visual Programming Assignment 2 Requirements Design a Puzzle-game program that will have a form with an array" of 9 command-buttons (name them btn Num). Eight of the command-buttons will have the numbers 1 to 8 and one will be empty. By clicking on a command button the user will be able to move its number to the empty command-button if the two corrimand buttons are neighbors vertically or horizontally. The user wins the game if the numbers are set as: 1 2 3 4 5 6 OR 8 4 7 6 5 Your program should look like the figure below: 7 2 6 5 4 8 1 3 Move 10 how GTA Note that only numbers 1, 3 and 4 can be moved onto the empty command button. It will be a good idea if you use a 3x3 array to store your game. You must do: 1. write a function "NewGame" that will randomly allocate numbers 1 to 8 in any 8 of the 9 command buttons 2. Include a command button to restart a new game (call the function you wrote in 1). 3. Include a label to display the number of the move. This must be displayed when the user moves a number onto the empty command-button. 4. Write a function called "Solved to check whether or not a solution is reached (i.e. the numbers are placed in a winning position). 5. If the numbers are placed in a winning position your program should display in a message box "Congratulations - You Win and then it should start a new game. 6. You program should have the menu shown below where you should also include keyboard-access- keys and a separator bar between Level and Exit. Game Colour About New Game Red Level Green Beginner Blue Advance Other Exit Game Soler About New Game Begin 4 8. 7. The menu New Game should be associated with the command-button New Game. When the user selects a Level (Beginner or Advance) the menu of the corresponding level should become ticked. 9. The user should have the option to change the background color of the form from the menu Color. If the user selects Other then the Color-Common Dialog Control should appear allowing the user to select any other color 10. The menu About should display YOUR NAME in a message-box. 11. The menu Exit terminates the program. COMP-213 Visual Programming Assignment 2 Requirements Design a Puzzle-game program that will have a form with an array" of 9 command-buttons (name them btn Num). Eight of the command-buttons will have the numbers 1 to 8 and one will be empty. By clicking on a command button the user will be able to move its number to the empty command-button if the two corrimand buttons are neighbors vertically or horizontally. The user wins the game if the numbers are set as: 1 2 3 4 5 6 OR 8 4 7 6 5 Your program should look like the figure below: 7 2 6 5 4 8 1 3 Move 10 how GTA Note that only numbers 1, 3 and 4 can be moved onto the empty command button. It will be a good idea if you use a 3x3 array to store your game. You must do: 1. write a function "NewGame" that will randomly allocate numbers 1 to 8 in any 8 of the 9 command buttons 2. Include a command button to restart a new game (call the function you wrote in 1). 3. Include a label to display the number of the move. This must be displayed when the user moves a number onto the empty command-button. 4. Write a function called "Solved to check whether or not a solution is reached (i.e. the numbers are placed in a winning position). 5. If the numbers are placed in a winning position your program should display in a message box "Congratulations - You Win and then it should start a new game. 6. You program should have the menu shown below where you should also include keyboard-access- keys and a separator bar between Level and Exit. Game Colour About New Game Red Level Green Beginner Blue Advance Other Exit Game Soler About New Game Begin 4 8. 7. The menu New Game should be associated with the command-button New Game. When the user selects a Level (Beginner or Advance) the menu of the corresponding level should become ticked. 9. The user should have the option to change the background color of the form from the menu Color. If the user selects Other then the Color-Common Dialog Control should appear allowing the user to select any other color 10. The menu About should display YOUR NAME in a message-box. 11. The menu Exit terminates the programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started