Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
maxscharwath committed Jun 19, 2022
2 parents d2aabf5 + 19f557e commit f6099b8
Show file tree
Hide file tree
Showing 26 changed files with 1,024 additions and 2,575 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Dodo is stuck in traffic

Remake du jeu d’énigme bien connu **Rush Hour** en Java avec la librairie Swing.

![Example](docs/examples/playView.png)

## Auteurs
- Maxime Scharwath
- Nicolas Crausaz
Expand Down
1,600 changes: 0 additions & 1,600 deletions docs/DiagrammePrésentation.sly

This file was deleted.

Binary file modified docs/diagramme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/mainView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/menuView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/playView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/playViewWin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,964 changes: 991 additions & 973 deletions docs/v2.sly

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/assets/AssetManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class AssetManager<A> {
private static final List<AssetManager<?>> ASSET_MANAGERS = new LinkedList<>();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/assets/Audio.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class Audio {
private final Clip clip;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/assets/AudioManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class AudioManager {
private static AudioManager instance;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/heigvd/mcr/assets/SpriteSheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.file.Path;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -20,6 +19,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class SpriteSheet {
private final Map<String, Image> sprites = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public abstract class AssetLoader<T> {
private final URL url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class AudioAssetLoader extends AssetLoader<Audio> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class ImageAssetLoader extends AssetLoader<Image> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class LevelAssetLoader extends AssetLoader<LevelState> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class SpriteSheetAssetLoader extends AssetLoader<SpriteSheet> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class LevelsRegister implements Register<LevelState> {
@Override
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/assets/registers/Register.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public interface Register<A> {
/**
Expand Down
13 changes: 12 additions & 1 deletion src/main/java/ch/heigvd/mcr/commands/CheatCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@

import java.util.*;

/**
* Commande permettant de tricher en supprimant une entité aléatoirement
* (ne peut pas supprimer la voiture du joueur)
*
* @author Jonathan Friedli
* @author Lazar Pavicevic
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class CheatCommand implements Command {
private static final Random rand = new Random();
private Entity deletedEntity;
Expand All @@ -24,7 +35,7 @@ public void execute() {
if (i == j) {
if (!array[i].isThePlayer()) {
deletedEntity = array[i];
} else {
} else {
deletedEntity = array[i + 1];
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/commands/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public interface Command {
/**
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/commands/LoadLevelCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class LoadLevelCommand implements Command {
private final int levelId;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/commands/MacroCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class MacroCommand implements Command {
private final List<Command> subCommands;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/commands/MoveCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class MoveCommand implements Command {
private final Entity entity;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/commands/TurnCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class TurnCommand extends MacroCommand {
@Override
Expand Down
1 change: 1 addition & 0 deletions src/main/java/ch/heigvd/mcr/commands/UndoCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @author Maxime Scharwath
* @author Nicolas Crausaz
* @author Valentin Kaelin
* @version 2022-06-19
*/
public class UndoCommand implements Command {
@Override
Expand Down

0 comments on commit f6099b8

Please sign in to comment.