diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..c51fbeb6edb5f5974c1fb74356f6ef57a90b4965 --- /dev/null +++ b/pom.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>au.edu.unimelb.cis</groupId> + <artifactId>bagel</artifactId> + <version>0.1-SNAPSHOT</version> + <packaging>jar</packaging> + + <build> + <sourceDirectory>src/</sourceDirectory> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>14</source> + <target>14</target> + </configuration> + </plugin> + </plugins> + </build> + + <properties> + <maven.compiler.source>14</maven.compiler.source> + <maven.compiler.target>14</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>io.github.eleanor-em</groupId> + <artifactId>bagel</artifactId> + <version>1.9.3</version> + </dependency> + </dependencies> +</project> diff --git a/res/.DS_Store b/res/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..aff6d284e04b03c88163e0ae210953338ef5186a Binary files /dev/null and b/res/.DS_Store differ diff --git a/res/IO/environment.csv b/res/IO/environment.csv new file mode 100644 index 0000000000000000000000000000000000000000..79fea88a9ab126ee1e10f0828bcff2047ec182f7 --- /dev/null +++ b/res/IO/environment.csv @@ -0,0 +1,3 @@ +Player,650,100,2 +Zombie,300,200 +Sandwich,500,400 \ No newline at end of file diff --git a/res/font/DejaVuSans-Bold.ttf b/res/font/DejaVuSans-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c0d8e5e462df7f268efba09f6931e37daad151e1 Binary files /dev/null and b/res/font/DejaVuSans-Bold.ttf differ diff --git a/res/images/background.png b/res/images/background.png new file mode 100644 index 0000000000000000000000000000000000000000..a6601996a24eebf1b568ad8e05d2e137a030b52e Binary files /dev/null and b/res/images/background.png differ diff --git a/res/images/player.png b/res/images/player.png new file mode 100644 index 0000000000000000000000000000000000000000..103a2ff1c64ccd5bf18b9ef8b2ca444dbdf204d1 Binary files /dev/null and b/res/images/player.png differ diff --git a/res/images/sandwich.png b/res/images/sandwich.png new file mode 100644 index 0000000000000000000000000000000000000000..87e12ec3db6704914262fd359822407fb9ecd172 Binary files /dev/null and b/res/images/sandwich.png differ diff --git a/res/images/zombie.png b/res/images/zombie.png new file mode 100644 index 0000000000000000000000000000000000000000..41519c41828d76f5cdfbd9493025d3867347d926 Binary files /dev/null and b/res/images/zombie.png differ diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..24957dce42144cc115095b85bb08b4dcbdca5642 Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/ShadowTreasure.java b/src/ShadowTreasure.java new file mode 100644 index 0000000000000000000000000000000000000000..907483ca2e199fc5e36e83490af616e68a0bb251 --- /dev/null +++ b/src/ShadowTreasure.java @@ -0,0 +1,28 @@ +import bagel.*; +import java.io.IOException; +/** + * an example Bagel game. + */ +public class ShadowTreasure extends AbstractGame { + /** + * background image + */ + private final Image BACKGROUND = new Image("res/images/background.png"); + /** + * Performs a state update. + */ + @Override + public void update(Input input) + { + // Draw background + BACKGROUND.drawFromTopLeft(0, 0); + + } + /** + * The entry point for the program. + */ + public static void main(String[] args) throws IOException { + ShadowTreasure game = new ShadowTreasure(); + game.run(); + } +}