⚡ Add project basis.
This commit is contained in:
parent
b5124cf6b0
commit
95f57e1165
6
README.txt
Normal file
6
README.txt
Normal file
@ -0,0 +1,6 @@
|
||||
Projet de Conception Logiciel concu par :
|
||||
|
||||
LUCAS Valentin
|
||||
LEGOT Quentin
|
||||
NEVEU Thomas
|
||||
|
4
src/fr/unicaen/games/Game.java
Normal file
4
src/fr/unicaen/games/Game.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games;
|
||||
|
||||
public class Game {
|
||||
}
|
18
src/fr/unicaen/games/Weapon/Firearm.java
Normal file
18
src/fr/unicaen/games/Weapon/Firearm.java
Normal file
@ -0,0 +1,18 @@
|
||||
package fr.unicaen.games.Weapon;
|
||||
|
||||
public class Firearm implements Weapon{
|
||||
@Override
|
||||
public int getBullet() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int horizontalDistance() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int verticalDistance() {
|
||||
return 0;
|
||||
}
|
||||
}
|
8
src/fr/unicaen/games/Weapon/Weapon.java
Normal file
8
src/fr/unicaen/games/Weapon/Weapon.java
Normal file
@ -0,0 +1,8 @@
|
||||
package fr.unicaen.games.Weapon;
|
||||
|
||||
public interface Weapon {
|
||||
|
||||
public int getBullet();
|
||||
public int horizontalDistance();
|
||||
public int verticalDistance();
|
||||
}
|
6
src/fr/unicaen/games/action/Action.java
Normal file
6
src/fr/unicaen/games/action/Action.java
Normal file
@ -0,0 +1,6 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public interface Action {
|
||||
|
||||
public void doAction();
|
||||
}
|
8
src/fr/unicaen/games/action/DeployShield.java
Normal file
8
src/fr/unicaen/games/action/DeployShield.java
Normal file
@ -0,0 +1,8 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class DeployShield implements Action{
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
}
|
4
src/fr/unicaen/games/action/DropBomb.java
Normal file
4
src/fr/unicaen/games/action/DropBomb.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class DropBomb extends DropObject{
|
||||
}
|
4
src/fr/unicaen/games/action/DropMine.java
Normal file
4
src/fr/unicaen/games/action/DropMine.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class DropMine extends DropObject{
|
||||
}
|
8
src/fr/unicaen/games/action/DropObject.java
Normal file
8
src/fr/unicaen/games/action/DropObject.java
Normal file
@ -0,0 +1,8 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class DropObject implements Action{
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
}
|
8
src/fr/unicaen/games/action/Move.java
Normal file
8
src/fr/unicaen/games/action/Move.java
Normal file
@ -0,0 +1,8 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class Move implements Action{
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
}
|
8
src/fr/unicaen/games/action/Nothing.java
Normal file
8
src/fr/unicaen/games/action/Nothing.java
Normal file
@ -0,0 +1,8 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class Nothing implements Action {
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
}
|
8
src/fr/unicaen/games/action/Shot.java
Normal file
8
src/fr/unicaen/games/action/Shot.java
Normal file
@ -0,0 +1,8 @@
|
||||
package fr.unicaen.games.action;
|
||||
|
||||
public class Shot implements Action{
|
||||
@Override
|
||||
public void doAction() {
|
||||
|
||||
}
|
||||
}
|
4
src/fr/unicaen/games/grid/Bomb.java
Normal file
4
src/fr/unicaen/games/grid/Bomb.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
public class Bomb extends Explosive{
|
||||
}
|
4
src/fr/unicaen/games/grid/Box.java
Normal file
4
src/fr/unicaen/games/grid/Box.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
public interface Box {
|
||||
}
|
4
src/fr/unicaen/games/grid/EnergyBall.java
Normal file
4
src/fr/unicaen/games/grid/EnergyBall.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
public class EnergyBall implements Box{
|
||||
}
|
4
src/fr/unicaen/games/grid/Explosive.java
Normal file
4
src/fr/unicaen/games/grid/Explosive.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
public class Explosive implements Box{
|
||||
}
|
12
src/fr/unicaen/games/grid/Grid.java
Normal file
12
src/fr/unicaen/games/grid/Grid.java
Normal file
@ -0,0 +1,12 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
import fr.unicaen.utils.Point;
|
||||
import fr.unicaen.utils.Tuple;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class Grid {
|
||||
|
||||
private HashMap<Point<Integer, Integer>, Tuple<Box, Box, Box>> board;
|
||||
|
||||
}
|
4
src/fr/unicaen/games/grid/Mine.java
Normal file
4
src/fr/unicaen/games/grid/Mine.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
public class Mine extends Explosive{
|
||||
}
|
4
src/fr/unicaen/games/grid/Wall.java
Normal file
4
src/fr/unicaen/games/grid/Wall.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.grid;
|
||||
|
||||
public class Wall implements Box{
|
||||
}
|
61
src/fr/unicaen/games/player/AbstractPlayer.java
Normal file
61
src/fr/unicaen/games/player/AbstractPlayer.java
Normal file
@ -0,0 +1,61 @@
|
||||
package fr.unicaen.games.player;
|
||||
|
||||
import fr.unicaen.games.Weapon.Weapon;
|
||||
import fr.unicaen.utils.Point;
|
||||
|
||||
public abstract class AbstractPlayer {
|
||||
|
||||
private int id;
|
||||
private Point position;
|
||||
private int ernergy;
|
||||
private Weapon weapon;
|
||||
private boolean shieldDeploy;
|
||||
|
||||
public AbstractPlayer(int id, Point position, int ernergy, Weapon weapon, boolean shieldDeploy) {
|
||||
this.id = id;
|
||||
this.position = position;
|
||||
this.ernergy = ernergy;
|
||||
this.weapon = weapon;
|
||||
this.shieldDeploy = shieldDeploy;
|
||||
}
|
||||
|
||||
public boolean isAlive(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Point getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public int getErnergy() {
|
||||
return ernergy;
|
||||
}
|
||||
|
||||
public Weapon getWeapon() {
|
||||
return weapon;
|
||||
}
|
||||
|
||||
public boolean isShieldDeploy() {
|
||||
return shieldDeploy;
|
||||
}
|
||||
|
||||
public void setErnergy(int ernergy) {
|
||||
this.ernergy = ernergy;
|
||||
}
|
||||
|
||||
public void setPosition(Point position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public void setShieldDeploy(boolean shieldDeploy) {
|
||||
this.shieldDeploy = shieldDeploy;
|
||||
}
|
||||
|
||||
public void setWeapon(Weapon weapon) {
|
||||
this.weapon = weapon;
|
||||
}
|
||||
}
|
10
src/fr/unicaen/games/player/ComputerPlayer.java
Normal file
10
src/fr/unicaen/games/player/ComputerPlayer.java
Normal file
@ -0,0 +1,10 @@
|
||||
package fr.unicaen.games.player;
|
||||
|
||||
import fr.unicaen.games.Weapon.Weapon;
|
||||
import fr.unicaen.utils.Point;
|
||||
|
||||
public class ComputerPlayer extends AbstractPlayer{
|
||||
public ComputerPlayer(int id, Point position, int ernergy, Weapon weapon, boolean shieldDeploy) {
|
||||
super(id, position, ernergy, weapon, shieldDeploy);
|
||||
}
|
||||
}
|
10
src/fr/unicaen/games/player/HumanPlayer.java
Normal file
10
src/fr/unicaen/games/player/HumanPlayer.java
Normal file
@ -0,0 +1,10 @@
|
||||
package fr.unicaen.games.player;
|
||||
|
||||
import fr.unicaen.games.Weapon.Weapon;
|
||||
import fr.unicaen.utils.Point;
|
||||
|
||||
public class HumanPlayer extends AbstractPlayer{
|
||||
public HumanPlayer(int id, Point position, int ernergy, Weapon weapon, boolean shieldDeploy) {
|
||||
super(id, position, ernergy, weapon, shieldDeploy);
|
||||
}
|
||||
}
|
4
src/fr/unicaen/games/player/Player.java
Normal file
4
src/fr/unicaen/games/player/Player.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.games.player;
|
||||
|
||||
public interface Player {
|
||||
}
|
4
src/fr/unicaen/graphics/GameScrenn.java
Normal file
4
src/fr/unicaen/graphics/GameScrenn.java
Normal file
@ -0,0 +1,4 @@
|
||||
package fr.unicaen.graphics;
|
||||
|
||||
public class GameScrenn{
|
||||
}
|
11
src/fr/unicaen/graphics/MainMenuScrenn.java
Normal file
11
src/fr/unicaen/graphics/MainMenuScrenn.java
Normal file
@ -0,0 +1,11 @@
|
||||
package fr.unicaen.graphics;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class MainMenuScrenn extends Application {
|
||||
@Override
|
||||
public void start(Stage stage) throws Exception {
|
||||
|
||||
}
|
||||
}
|
46
src/fr/unicaen/utils/Point.java
Normal file
46
src/fr/unicaen/utils/Point.java
Normal file
@ -0,0 +1,46 @@
|
||||
package fr.unicaen.utils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Point<X,Y> {
|
||||
|
||||
private X x;
|
||||
private Y y;
|
||||
public Point(X x, Y y){
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public Point(){
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public X getX() {
|
||||
return this.x;
|
||||
}
|
||||
|
||||
public Y getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setX(X x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public void setY(Y y) {
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Point<?, ?> point = (Point<?, ?>) o;
|
||||
return Objects.equals(x, point.x) && Objects.equals(y, point.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(x, y);
|
||||
}
|
||||
}
|
57
src/fr/unicaen/utils/Tuple.java
Normal file
57
src/fr/unicaen/utils/Tuple.java
Normal file
@ -0,0 +1,57 @@
|
||||
package fr.unicaen.utils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class Tuple<A,B,C> {
|
||||
|
||||
private A a;
|
||||
private B b;
|
||||
private C c;
|
||||
|
||||
public Tuple(A a, B b, C c){
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public Tuple(){
|
||||
this(null, null, null);
|
||||
}
|
||||
|
||||
public A getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public B getB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public C getC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setA(A a) {
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public void setB(B b) {
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
public void setC(C c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Tuple<?, ?, ?> tuple = (Tuple<?, ?, ?>) o;
|
||||
return Objects.equals(a, tuple.a) && Objects.equals(b, tuple.b) && Objects.equals(c, tuple.c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(a, b, c);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user