Skip to content

MiramarCISC/CISC191-SUM20-A

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CISC191-SUM20-A

The Wizard

A top down shooter by Group A

Level 1 demo Level 2 demo Level 3 demo Boss loadscreen demo Normal loadscreen demo

Building and Running Project

Building Using Maven (Recommended. Includes project unit tests)

Tl;dr

mvn install

# Running .jar
java -jar target/WizardGame-0.0.1-SNAPSHOT.jar

# Running main class
mvn exec:java -Dexec.mainClass="edu.sdccd.cisc191.wizardGame.Game"

Maven Installation

MacOS

brew install maven

Windows

Maven Usage

First, Make sure you are in the project root directory.

With the included pom.xml from the repo and Maven already installed, run the following to compile and install all dependencies

mvn install

Then execute .jar file to run project

java -jar target/WizardGame-0.0.1-SNAPSHOT.jar

To run specific class. (replace <class> with path to java file starting from edu.sdccd.cisc191.wizardGame directory, using . as path separator).

# Template
mvn exec:java -Dexec.mainClass="edu.sdccd.cisc191.wizardGame.<class>"

# Running Game class
mvn exec:java -Dexec.mainClass="edu.sdccd.cisc191.wizardGame.Game"

Game class can be ran by default using only mvn exec:java by modifying pom.xml. Just uncomment this section from the xml file. <mainClass> can be changed to whatever default class to run.

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <configuration>
    <mainClass>edu.sdccd.cisc191.wizardGame.Game</mainClass>
  </configuration>
</plugin>

To recompile project

mvn compile

To package project into a JAR file

mvn package

To run test suite

mvn clean test
# -e to run tests with full stack trace on failures
mvn clean test -e

To clean and remove maven build from project

mvn clean

NOTE: If unit tests fail after new changes that prevents from building the .jar file, although not recommended, simply skip unit testing from build by running

mvn clean install -Dmaven.test.skip

or to just compile and package into a JAR file without reinstalling dependencies

mvn package -Dmaven.test.skip

Building Using Ant (Does not include project unit tests)

Tl:dr

ant
ant run

Ant Installation

MacOS

brew install ant

Windows

Ant Usage

First, Make sure you are in the project root directory.

With the included build.xml from the repo and Ant installed, to compile and distribute .jar file, run

ant

Then run WizardGame.jar generated with

ant run

Finally, to clean all build and dist run

ant clean

Building Manually in Terminal (Does not include project unit tests)

Tl;dr

mkdir -p build
alias javarun='javac -Xlint -sourcepath src -d build src/main/**/*.java; find . -name "*.java" -not -path "*/test/*" > source.txt; java -cp build edu.sdccd.cisc191.wizardGame.Game'
javarun

Building and Running

From root project directory. Create build directory.

mkdir -p build

Then run the following to compile .java into build directory as classpath

javac -Xlint -sourcepath src -d build src/main/**/*.java
find . -name "*.java" -not -path "*/test/*" > source.txt

Then copy all resource files into build directory

cp src/main/resources/*.png src/main/resources/*.jpg build

Then run Game class

java -cp build edu.sdccd.cisc191.wizardGame.Game

Recompiling

javac -Xlint -sourcepath src -d build src/main/**/*.java
find . -name "*.java" -not -path "*/test/*" > source.txt
java -cp build edu.sdccd.cisc191.wizardGame.Game

Simple Shortcut

Assign an alias to recompile with just one command

alias javarun='javac -Xlint -sourcepath src -d build src/main/**/*.java; find . -name "*.java" -not -path "*/test/*" > source.txt; java -cp build edu.sdccd.cisc191.wizardGame.Game'

Then simply run

javarun

Cleaning Up

rm -r build source.txt

Setting Up Project Folder Structure in IntelliJ IDEA

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages