Skip to content

About

Java Swing maze game featuring physics-based movement, collision detection, level loading and JUnit tests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Java Maze Game — Redux

A collaborative computer science project at Université Paris-Saclay. A mouse-controlled ball navigates a maze using a simple physics simulation built with Java and Swing.

Features

  • Acceleration, velocity limits and friction
  • Wall and corner collision response
  • Visible and hidden hazards, lives and respawning
  • Text-based maze loading and support for passages between levels
  • Win and loss screens
  • Swing timer-driven rendering and mouse input

Run the game

Install a JDK (tested with Java 21). From the repository root:

mkdir out
javac -encoding UTF-8 -d out src/*.java
java -cp out Main

Move the mouse over the ball to activate control, then move the mouse to steer it. The default level is Lab2.txt; keep the level files in the working directory. Main.java selects the starting level.

Tests

Download JUnit Platform Console Standalone 1.10.0 into lib/. The dependency is not committed.

Linux/macOS (from repository root, after compiling the game):

javac -encoding UTF-8 -cp 'out:lib/junit-platform-console-standalone-1.10.0.jar' -d out tests/*.java
java -jar lib/junit-platform-console-standalone-1.10.0.jar execute --class-path out --scan-class-path

Windows PowerShell (after compiling the game):

javac -encoding UTF-8 -cp 'out;lib/junit-platform-console-standalone-1.10.0.jar' -d out tests/LabyrintheTest.java
java -jar lib/junit-platform-console-standalone-1.10.0.jar execute --class-path out --scan-class-path

All three original test methods completed successfully on Java 21. Two contain assertions (maze dimensions and cell types); the ball test is an empty placeholder. Full gameplay and physics behavior have not been independently validated.

Project structure

  • src/: game logic, cell hierarchy, mouse input and Swing interface
  • tests/: original JUnit tests
  • Lab*.txt: maze descriptions and test fixtures
  • lib/: local test dependency directory
  • docs/: original development notes

Authors

  • Arnaud Nguyen
  • Raphaël Rabuteau

Collaborative university project. Original implementation preserved.

About

Java Swing maze game featuring physics-based movement, collision detection, level loading and JUnit tests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages