CST8221_F21_A11Spec.pdf ASSIGNMENT 1.1 – GUI for Game (Piccross1) General View Due Date: prior or on Oct 9th 2021 (midnight) • 2nd Due date (until 16th Oct) - 50% off. Earnings: 10% of your course...

1 answer below »
Java


CST8221_F21_A11Spec.pdf ASSIGNMENT 1.1 – GUI for Game (Piccross1) General View Due Date: prior or on Oct 9th 2021 (midnight) • 2nd Due date (until 16th Oct) - 50% off. Earnings: 10% of your course grade. Purpose: Create the interface and basic organization of the Game Piccross. ❖ This is the first task in JAP. This application will be developed during this semester and the code will be updated to incorporate new functionalities. ❖ PART I: What you need to create the interface considering the model: o A basic splash screen to start the application. o A basic controller (to be increased in the next assignments). o The main window for the game (Piccross). ❖ PART II: Additional elements are required to define: o Code documentation (using Java code conventions) o Javadoc files. o Executable Jar. Note 1: About Teams As mentioned in CSI, teams are acceptable for submission obeying the rule that both students should belong to the same Lab Session. And remember that demos are required to get points in specific weeks when developing the code. In this case, it is required to include a kind of git information (it can be given by screenshot, git status, etc.) that can identify that both students are developing the code. 1 The name “Piccross” is intentionally changed in comparison with the original “Picross” game since some functionalities will be different. This idea was originally proposed by Prof. Daniel Cormier, instructor in some labs this semester. Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 2 Part I – Creating the Piccross 1.1. BASIC GAME The Piccross (based on Picross) is a simple visual game in which you need to be able to identify the picture defined in a cross board using one specific logic. Some references for this game can be found easily on the internet. For instance, you can play an interesting version using the following site: http://picross.net/ Example: Fig. 1 – Picross example ❖ In short, each row and column indicate a sequence of numbers that are indicating how many blocks (squares) should appear. ➢ The initial board is completely “blank” and the user must consider the logic to be able to select appropriately the correct distribution of squares. ➢ For instance, the sequence (5,1) is indicating that we should find a contiguous sequence of 5 squares followed by some spaces (blank squares) and another one. ➢ The problem is that we do not have any idea about this distribution. ➢ Our game (Piccross) is a basic adaptation that is using the same idea. http://picross.net/ Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 3 1.2. SCREEN SPLASH The beginning of the game must include a splash screen (see Fig. 2). Fig. 2 – Splash screen Class GameSplash The class GameSplash will manage the splash screen. This screen should stay during some seconds (for example, between five to ten seconds) and then, close to let the main application appears. • Change the original image to include your identification (or your team). 1.3. GAME CONTROLLER GameController will assemble the UI, primarily in its default constructor. This class must also have an inner class called Controller. You will use this to manage the visual components. The Controller class will have very basic code. It reads the action command (or JavaFX equivalent) of the button that was pressed, and then prints it to the console. All buttons (and the checkbox) must have a unique action command. • NOTE: o If you are using Swing, GameController must extend JFrame. You may have to define your JFrame parameters in GameController instead of the Piccross class. o If you are using JavaFX, GameController may extend Scene, Pane or any descended Pane subclass as you see fit. Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 4 1.4. BASIC GAME INTERFACE 1.4.1. General Interface The Piccross has a very simple interface, as indicated in the following figures. In the beginning, the interface is supposed to show a neutral panel: Fig. 3 – Initial game (colors are only descriptive) Note that this game is composed by several panels: • Board panel: a set of panels that will compose the board of panels that can be changed using colors (using the checking box “mark”). • Mark panel: When we set the control for mark or not the squared. • Left panel: Indicating the number of squares to be shown by each line (use the set of Labels for this). • Top panel: Indicating the set of squares to be shown in each column (the Labels are using the number of squares). • Control panel: Where you can see the following components: o Image logo: Using the Piccross. Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 5 o Points: Showing the points at this moment. o History Area: To describe the sequence of movements performed by the user. o Time: To show the number of seconds since the beginning of game. o Reset button: To restart the game. 1.4.2. Initial Behavior The purpose for this initial assignment is that any action can be shown in the history area at Control Panel. The messages to be printed are supposed to be like this: • Message type 1: When checkbox “Mark” is selected or unselected. • Message type 2: When one specific panel that represents a square is clicked. • Clean message: When “Reset” button is pressed. The list of messages is sequential. It means that you need to “index” the sequence. Ex: … Mark set; Pos 1,3 clicked; Mark reset; … • For while, it is not required to use routines to count the time (in seconds since the beginning of the game), neither to test if the current layout is matching with one specific picture. 1.4.3. GUI Restrictions The definition for all colors and sizes are not formalized here, since the general layout is respected. However, we have general restrictions: • All classes must belong to one specific package (“piccross”). • This layout uses Java’s default look and feel. • The frame (or stage) must not be resizable. • Your name / team name must appear in the title bar. • You may ONLY use BorderLayout, FlowLayout and GridLayout (or the JavaFX equivalent). • This UI must be assembled manually. Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 6 o The use of UI builders is not permitted this time and will imply in deductions. 1.4.4. EXTRA: Preview about Future Version Note 2: Future Game Behavior The activity now is only related to the game interface and basic behavior. The following description is anticipating some aspects of the game that will be updated / changed in future assignments. • In the future implementation, the game is supposed to match with one specific pattern (the original “picture” behind the board). • Each square correctly clicked is giving 1 pt in the game (not used for while). • Wrong selection (in comparison with the internal representation) will stop the game showing the marks in the end. • This is the reason to use the “Reset” button. • Once clicked, the colors of square panels will be changed (green / red) according to the pattern to be used. Example: Fig. 4 – Main window (after execution) Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 7 Visually, the user actions are using mouse click over the panels will observe the “mark” (if is set or not) according to this basic rule: • Correct square clicked (and “mark” is not set): color green is shown. • Correct square clicked (using marks): red color is shown. • Incorrect selection: game finishes. • For this assignment, the original behavior (the internal pattern) can use a local array representation. But in the future, it will not be “hard-coded” o The pattern must be loaded dynamically. For example, the above representation for the image is a kind of file using the following input (in binary): 00100 00100 11111 01110 01010 • Or, considering decimal representation: 4 4 31 14 10 . Part II – Documentation and Packing 2.1. BASIC DOCUMENTATION CODE ELEMENTS (Basic criteria) • Code well organizes, methods and functions grouped logically, classes in order, etc. • Label naming (variables, constants, methods, functions, etc.) consistent and meaningful. • Code consistently indented and spaced (define a consistency /organization). • Good commenting which includes block comments. • In the case of teams, Git files are required to be include. JAVADOC (following Java Standard) • Javadoc outputs are required, and the pages / folders must be included. Algonquin College – JAP: CST8221 – Assignment 1 Specification – Fall, 2021 8 JAR (Executable file) • Finally, it is required to create and include JAR files (that can open the binary using Java) Note 3: Read Assignment Standard The code and patterns to be used in submission must follow the Java Code Conventions, but also the elements described in the Assignment Standard. Evaluation ❖ Please read the Assignment Submission Standard and Marking Guide (at “Assignments > Standards” section). ❖ About Plagiarism: Your code must observe the configuration required (remember, for instance, the “splash screen” using your name. Similarly, we need to observe the policy against ethic conduct, avoiding problems with the 3-strike policy...
Answered 16 days AfterSep 10, 2021

Answer To: CST8221_F21_A11Spec.pdf ASSIGNMENT 1.1 – GUI for Game (Piccross1) General View Due Date: prior or on...

Ravindra Kumar answered on Sep 13 2021
135 Votes
PicrossGame/.classpath

    
    
    
    
PicrossGame/.project

     PicrossGame
    
    
    
    
        
             org.eclipse.jdt.core.javabuilder
            
            
        
        
             org.eclipse.xtext.ui.shared.xtextBuilder
            
            
        
    
    
         org.eclipse.xtext.ui.shared.xtextNature
         org.eclipse.jdt.core.javanature
    
PicrossGame/.settin
gs/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
PicrossGame/bin/application/application.css
/* JavaFX CSS - Leave this comment until you have at least create one rule which uses -fx-Property */
PicrossGame/bin/application/Main.class
package application;
public synchronized class Main extends javafx.application.Application {
public void Main();
public void start(javafx.stage.Stage);
public static void main(String[]);
}
PicrossGame/bin/application/Main.fxml



































































PicrossGame/bin/application/MainPicross.class
package application;
public synchronized class MainPicross {
private javafx.scene.control.Label lbl1H;
private javafx.scene.control.Label lbl2H;
private javafx.scene.control.Label lbl3H;
private javafx.scene.control.Label lbl4H;
private javafx.scene.control.Label lbl5H;
private javafx.scene.control.Label lbl1V;
private javafx.scene.control.Label lbl2V;
private javafx.scene.control.Label lbl3V;
private javafx.scene.control.Label lbl4V;
private javafx.scene.control.Label lbl5V;
private javafx.scene.control.Label timer;
private javafx.scene.layout.Pane mainPanel;
private javafx.scene.control.Button btnReset;
public void MainPicross();
public void test(javafx.event.ActionEvent);
private void timer();
public void setTextLable();
}
PicrossGame/bin/application/Picros.class
package application;
public synchronized class Picros...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here