ONLY IN JAVA. Create a Java program that you can play the game "More or Less, Less is More." Rules of the game: The two-dimensional field of the game must be m x n in size (game field). The buttons that make up the game field each have a number assigned to them. beginning of the game: The target value is shown above the game field. The numbers on the buttons of the game field are set to a random digit between 0 and 9. • Below the game field, you may read the current sum of the numbers displayed on the buttons. • Above the playing field in the upper right corner is a display of the remaining movements. Playing: The player chooses their first move by clicking any button (button A) on the playing area. 1. The player has the option to select a second button (button B) that is situated in the same row or column as the first button they chose (A). 2. When button (A) is clicked, value is changed in accordance with the following formula: (AoperationB)mod10 equals A. 3. The basic game's operation will be +. 4. Repeat step 1 with fewer steps, using the previously chosen button (B) as the current button (A). Continue doing thus up until the move counter exceeds 0 Game objective: The closest possible total of the numbers on the game field's buttons should be used. to the goal value indicated above the playing area. If at the conclusion of the move counter, the total of the numbers on the game field's buttons exceeds the desired value, the The player is out of the game. Task demands: (Parenthesis added): • creating a user interface that enables playing (on a different playing field each time), so that with each new game release, we have a new setup (random) • creation of a user interface that allows the game field to be saved to a file so that it can be selected from during play. • Upgrade of the game control menu: the option to select the difficulty level (easy, medium, hard); the set difficulty should affect the target value and the number of moves to completion. • Game control menu (new game, setting the size of the game field, setting the number of moves, setting the target value). • The graphical user interface should inform the player if they have lost the game or the difference in points from the desired value once the move counter expires. • Current mathematical operation: Include a component that shows the current mathematical operation on the right side of the playing field. Step Playing 2 substitutes the current mathematical operation for the + operation. The present mathematical operation only holds true for one move, and then a new mathematical operation is chosen at random and assessed in the following move. The mathematical operations +,,, and / are your options. • Upgrading the currently selected mathematical operation: The currently selected operation is highlighted, and the next m mathematical operations are displayed on the right side of the game field. • The graphical user interface should to aid the user in choosing button B in Playing Step 1 by displaying the updated value that button A would acquire in the event that the user selected any conceivable button B. • Include a choice allowing the graphical user interface to recommend pressing button B in Playing 1 step. The proposed button B need to be a wise choice that enables the user to approach the desired value.

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

ONLY IN JAVA.

Create a Java program that you can play the game "More or Less, Less is More."
Rules of the game:
The two-dimensional field of the game must be m x n in size (game field). The buttons that make up the game field each have a number assigned to them.
beginning of the game:
The target value is shown above the game field. The numbers on the buttons of the game field are set to a random digit between 0 and 9.
• Below the game field, you may read the current sum of the numbers displayed on the buttons.
• Above the playing field in the upper right corner is a display of the remaining movements.
Playing: The player chooses their first move by clicking any button (button A) on the playing area.
1. The player has the option to select a second button (button B) that is situated in the same row or column as the first button they chose (A).
2. When button (A) is clicked, value is changed in accordance with the following formula: (AoperationB)mod10 equals A.
3. The basic game's operation will be +.
4. Repeat step 1 with fewer steps, using the previously chosen button (B) as the current button (A). Continue doing thus up until the move counter exceeds 0
Game objective:

The closest possible total of the numbers on the game field's buttons should be used.

to the goal value indicated above the playing area. If at the conclusion of the move counter, the total of the numbers on the game field's buttons exceeds the desired value, the
The player is out of the game.
Task demands: (Parenthesis added):
• creating a user interface that enables playing (on a different playing field each time), so that with each new game release, we have a new setup (random)
• creation of a user interface that allows the game field to be saved to a file so that it can be selected from during play.
• Upgrade of the game control menu: the option to select the difficulty level (easy, medium, hard); the set difficulty should affect the target value and the number of moves to completion. • Game control menu (new game, setting the size of the game field, setting the number of moves, setting the target value).
• The graphical user interface should inform the player if they have lost the game or the difference in points from the desired value once the move counter expires.
• Current mathematical operation: Include a component that shows the current mathematical operation on the right side of the playing field. Step Playing 2 substitutes the current mathematical operation for the + operation. The present mathematical operation only holds true for one move, and then a new mathematical operation is chosen at random and assessed in the following move. The mathematical operations +,,, and / are your options.
• Upgrading the currently selected mathematical operation: The currently selected operation is highlighted, and the next m mathematical operations are displayed on the right side of the game field.
• The graphical user interface should to aid the user in choosing button B in Playing Step 1 by displaying the updated value that button A would acquire in the event that the user selected any conceivable button B.
• Include a choice allowing the graphical user interface to recommend pressing button B in Playing 1 step. The proposed button B need to be a wise choice that enables the user to approach the desired value.

Expert Solution
steps

Step by step

Solved in 6 steps with 8 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT