mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-01-25 14:34:07 +00:00
ajout de personnages
This commit is contained in:
29
Makefile
Normal file
29
Makefile
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Paramètres
|
||||||
|
.PHONY: all clean run
|
||||||
|
.SILENT: clean run
|
||||||
|
|
||||||
|
# variables
|
||||||
|
JAVAC = javac
|
||||||
|
JAVA = java
|
||||||
|
|
||||||
|
MAIN_FILE = Main
|
||||||
|
BIN_DIR = bin
|
||||||
|
SRC_DIR = src
|
||||||
|
LIB_DIR = lib
|
||||||
|
|
||||||
|
JAR = $(LIB_DIR)/*
|
||||||
|
|
||||||
|
# main
|
||||||
|
all: $(MAIN_FILE) run
|
||||||
|
|
||||||
|
$(MAIN_FILE) : $(BIN_DIR)/$(MAIN_FILE).class
|
||||||
|
|
||||||
|
$(BIN_DIR)/$(MAIN_FILE).class : $(SRC_DIR)/$(MAIN_FILE).java
|
||||||
|
@mkdir -p $(BIN_DIR)
|
||||||
|
$(JAVAC) -d $(BIN_DIR) -sourcepath $(SRC_DIR) -classpath $(JAR) $<
|
||||||
|
|
||||||
|
run:
|
||||||
|
java -cp $(BIN_DIR) $(MAIN_FILE)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf $(BIN_DIR)
|
||||||
@@ -18,6 +18,15 @@ C'est un projet de fin de Licence L1 en Informatique à UPEC, la création d'un
|
|||||||
|
|
||||||
- La partie **GRAPHIQUE**
|
- La partie **GRAPHIQUE**
|
||||||
|
|
||||||
|
- La partie **PROBLÈME ET SOLUTION RENCONTRÉES**
|
||||||
|
|
||||||
# CRÉDITS
|
# CRÉDITS
|
||||||
|
|
||||||
|
Ce projet a pu être aussi enrichissant grâce à :
|
||||||
|
|
||||||
|
- [LWJGL](https://www.lwjgl.org)
|
||||||
|
- [JOML](http://joml.org/)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Ce projet à été réalisé par FARIA Théo et GUEZO Loïc.
|
Ce projet à été réalisé par FARIA Théo et GUEZO Loïc.
|
||||||
6
pom.xml
6
pom.xml
@@ -1,6 +0,0 @@
|
|||||||
<?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>
|
|
||||||
</project>
|
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
|
import personnages.*;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
int[] size = new int[1];
|
||||||
|
|
||||||
|
Player player = new Player(size);
|
||||||
|
Robot robot = new Robot(size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/personnages/Characters.java
Normal file
10
src/personnages/Characters.java
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package personnages;
|
||||||
|
|
||||||
|
public class Characters {
|
||||||
|
protected int[] coordinate;
|
||||||
|
private int[] size; // N
|
||||||
|
|
||||||
|
protected Characters(int[] size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/personnages/Player.java
Normal file
7
src/personnages/Player.java
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
package personnages;
|
||||||
|
|
||||||
|
public class Player extends Characters {
|
||||||
|
public Player(int[] size) {
|
||||||
|
super(size);
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/personnages/Robot.java
Normal file
7
src/personnages/Robot.java
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
package personnages;
|
||||||
|
|
||||||
|
public class Robot extends Characters {
|
||||||
|
public Robot(int[] size) {
|
||||||
|
super(size);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user