Add project basis.

This commit is contained in:
Katchan 2021-10-09 12:04:24 +02:00
parent b5124cf6b0
commit 95f57e1165
27 changed files with 329 additions and 0 deletions

6
README.txt Normal file
View File

@ -0,0 +1,6 @@
Projet de Conception Logiciel concu par :
LUCAS Valentin
LEGOT Quentin
NEVEU Thomas

View File

@ -0,0 +1,4 @@
package fr.unicaen.games;
public class Game {
}

View 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;
}
}

View File

@ -0,0 +1,8 @@
package fr.unicaen.games.Weapon;
public interface Weapon {
public int getBullet();
public int horizontalDistance();
public int verticalDistance();
}

View File

@ -0,0 +1,6 @@
package fr.unicaen.games.action;
public interface Action {
public void doAction();
}

View File

@ -0,0 +1,8 @@
package fr.unicaen.games.action;
public class DeployShield implements Action{
@Override
public void doAction() {
}
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.action;
public class DropBomb extends DropObject{
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.action;
public class DropMine extends DropObject{
}

View File

@ -0,0 +1,8 @@
package fr.unicaen.games.action;
public class DropObject implements Action{
@Override
public void doAction() {
}
}

View File

@ -0,0 +1,8 @@
package fr.unicaen.games.action;
public class Move implements Action{
@Override
public void doAction() {
}
}

View File

@ -0,0 +1,8 @@
package fr.unicaen.games.action;
public class Nothing implements Action {
@Override
public void doAction() {
}
}

View File

@ -0,0 +1,8 @@
package fr.unicaen.games.action;
public class Shot implements Action{
@Override
public void doAction() {
}
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.grid;
public class Bomb extends Explosive{
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.grid;
public interface Box {
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.grid;
public class EnergyBall implements Box{
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.grid;
public class Explosive implements Box{
}

View 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;
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.grid;
public class Mine extends Explosive{
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.grid;
public class Wall implements Box{
}

View 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;
}
}

View 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);
}
}

View 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);
}
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.games.player;
public interface Player {
}

View File

@ -0,0 +1,4 @@
package fr.unicaen.graphics;
public class GameScrenn{
}

View 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 {
}
}

View 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);
}
}

View 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);
}
}