Commit 8db9debb authored by ces050's avatar ces050
Browse files

Created JUNIT testing skeleton, Scanned Project for bad Javadocs.

parent 320e10e6
......@@ -20,10 +20,10 @@ test {
// Needs to be either 11.0.2 or 14.0.2
javafx {
version = "14.0.2"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.media']
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.media' ]
}
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.6.2')
implementation 'org.junit.jupiter:junit-jupiter:5.6.2'
}
application {
mainClassName = project.hasProperty("mainClass") ? project.getProperty("mainClass") :
......
......@@ -2,16 +2,14 @@ package gameManager;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.media.MediaView;
import javafx.stage.Stage;
import javafx.util.Duration;
import mediaPlayer.MusicPlayer;
import java.io.File;
import java.nio.file.Paths;
/**
* Master application for the entire game itself, running this class begins the game and
* loads the user in the way the game is intended to be played.
*/
public class GameManager extends Application {
public static final int GAME_WIDTH = 800;
public static final int GAME_HEIGHT = 600;
......@@ -24,7 +22,7 @@ public class GameManager extends Application {
public static String styleSheet;
public MediaPlayer player;
public MediaPlayer player; //manages the game sounds
public static void main(String[] args) {
launch(args);
......@@ -52,6 +50,9 @@ public class GameManager extends Application {
playMusic();
}
/**
* Manages the MusicPlayer of the game to load the soundtrack into it
*/
private void playMusic(){
// get media
MusicPlayer.getMedia("/src/main/Resources/music/BabaIsUsMusic.mp3");
......
......@@ -12,7 +12,7 @@
* Package: gameMenu
* Class: GameMenuController
*
* Description: THIS IS A DESCRIPTION Y’ALL AND I NEED TO CHANGE THIS!
* Description: Controller for the GameMenu
*
* ****************************************
*/
......
......@@ -5,6 +5,9 @@ import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/**
* Main Application to run the GameMenu, loads in a GameMenuView to load the visuals
*/
public class GameMenuMain extends Application {
// view for the menu
......
......@@ -12,7 +12,7 @@
* Package: gameMenu
* Class: GameMenuView
*
* Description: THIS IS A DESCRIPTION Y’ALL AND I NEED TO CHANGE THIS!
* Description: Class storing most of the visual information for the GameMenu
*
* ****************************************
*/
......@@ -31,6 +31,9 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
/**
* Used to add visuals to the game menu in GameMenuMain
*/
public class GameMenuView {
private VBox root;
......@@ -41,6 +44,11 @@ public class GameMenuView {
private Label instructions, settings, exit;
/**
* Configures the main menu visually by loading the required pictures, and generating
* buttons or labels.
*/
public GameMenuView(){
// vertical root, set to min height + width, with id for background styling
root = new VBox();
......
......@@ -12,7 +12,7 @@ package gameboard;/* *****************************************
* Package: PACKAGE_NAME
* Class: gameboard.BabaIsYouGameGUIController
*
* Description: THIS IS A DESCRIPTION Y’ALL AND I NEED TO CHANGE THIS!
* Description: Master Controller of the Game GUI
*
* ****************************************
*/
......@@ -65,7 +65,11 @@ public class BabaIsYouGameGUIController {
private BabaIsYouGameGUIView theView;
/**
*
* @param theView
* @param theModel
*/
public BabaIsYouGameGUIController(BabaIsYouGameGUIView theView, BabaIsYouGameGUIModel theModel){
this.theModel = new BabaIsYouGameGUIModel();
this.theView = new BabaIsYouGameGUIView(theModel);
......
......@@ -12,7 +12,7 @@ package gameboard;/* *****************************************
* Package: PACKAGE_NAME
* Class: gameboard.BabaIsYouGameGUIModel
*
* Description: THIS IS A DESCRIPTION Y’ALL AND I NEED TO CHANGE THIS!
* Description: GUI GAME MODEL FOR PLAN B OF GAME
*
* ****************************************
*/
......
......@@ -52,6 +52,11 @@ public class BabaIsYouGameGUIView {
protected static Scene scene;
private BabaIsYouGameGUIModel theModel;
/**
* Loads up the Game GUI into the given model
* @param theModel BabaIsYouGameGUIModel object to be manipulated.
*/
public BabaIsYouGameGUIView(BabaIsYouGameGUIModel theModel){
this.theModel = new BabaIsYouGameGUIModel();
//Setting up the screen...
......
......@@ -12,7 +12,7 @@
* Package: gameboard
* Class: ExitScene
*
* Description: THIS IS A DESCRIPTION Y’ALL AND I NEED TO CHANGE THIS!
* Description: Once th game is won, this code outputs a victory screen.
*
* ****************************************
*/
......@@ -24,6 +24,9 @@ import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
/**
* Used to display the game won message once the game is completed.
*/
public class ExitScene {
/** The width of the board */
private static final int WIDTH = 800;
......
......@@ -46,7 +46,8 @@ public class InGameMenu {
private static BabaIsYouGameGUIController theController;
/**
* Generate the in-game menu after we pressed ESC while playing
* Generate the in-game menu after ESC is pressed while playing. Loads up a
* menu with options for the game, hints, a way to restart, and exit the game.
*/
public static void generateInGameMenu() {
VBox layout = new VBox();
......
/* *****************************************
* CSCI205 - Software Engineering and Design
* Spring 2021
* Instructor: Prof. Chris Dancy
*
* Name: Christiaan Smith
* Section: 1:50pm - 2:40pm
* Date: 5/18/2021
* Time: 1:51 AM
*
* Project: CSCI205SP21finalproject
* Package: PACKAGE_NAME
* Class: TestController
*
* Description: COLLECTION OF JUNIT TESTS TO TEST THE CONTROLLER
*
* ****************************************
*/
public class TestController {
}
/* *****************************************
* CSCI205 - Software Engineering and Design
* Spring 2021
* Instructor: Prof. Chris Dancy
*
* Name: Christiaan Smith
* Section: 1:50pm - 2:40pm
* Date: 5/18/2021
* Time: 1:52 AM
*
* Project: CSCI205SP21finalproject
* Package: PACKAGE_NAME
* Class: TestModel
*
* Description: COLLECTION OF JUNIT TESTS TO TEST THE MODEL
*
* ****************************************
*/
public class TestModel {
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment