Commit 3f336381 authored by Fardale's avatar Fardale

Correction merge foireux

parent 7efd200f
......@@ -19,12 +19,12 @@ To run
################### HOW TO DOCUMENT ###################
To document the project, you need the package doxygen. It will create a HTML documentation from the code. To have inheritance graphs, please install graphivz.
To document the project, you need the package doxygen. It will create a HTML documentation from the code. To have inheritance graphs, please install graphivz.
English versions :
make doc-html
Without graphivz
make doc-html2
......@@ -36,7 +36,7 @@ French versions :
Without graphivz
make doc-html2-fr
################### HOW TO PLAY ###################
1)Launch the game.
......@@ -63,9 +63,6 @@ TODO
################### DEVELOPMENT ###################
<<<<<<< HEAD
This game was created between september 2015 and january 2016. It was designed in a software engineering course of M1 at ENS Cachan, France. The following people were the developers : -Arrighi Emmanuel -Aubian Guillaume -Babonnaud William -Beauseigneur Clément -Begel Myriam -Bogdan Ursu -Cohen Louis -Chouasne-Guillon Gwendoline -Delcros Lucas -Dupriez Thomas -Garnier Remy -Ghyselen Alexis -Guerquin Arnaud -Hilaire Mathieu -Hocquet Guillaume -Huot Mathieu -Lopez Théodore -Ramusat Yann -Ringeade Clément -Toussaint Etienne -Thomas Colin -Ursu Bogdan
=======
This game was created between september 2015 and january 2016.
It was designed in a software engineering course of M1 at ENS Cachan, France.
The following people were the developers :
......
......@@ -15,15 +15,15 @@ import map_generation.tiles.TileType;
/**
*
* Represents a map of tiles
*
/**
*
* Represents a map of tiles
*
*/
public class Map implements Serializable {
/**
*
*
*/
private static final long serialVersionUID = -7578251078403583045L;
private Tile[][] map;
......@@ -34,10 +34,10 @@ public class Map implements Serializable {
private MapPoint stairsPosition;
private Entity[] entities;
private int height = 0, width = 0;
public Map() {}
public Map(Tile[][] m,Surface[] rooms, Surface[] corridors, Surface[] doors, MapPoint positionPlayerAtStart,MapPoint stairsPosition) {
map = m;
map = m;
this.positionPlayerAtStart=positionPlayerAtStart;
this.stairsPosition=stairsPosition;
this.rooms=rooms;
......@@ -46,36 +46,36 @@ public class Map implements Serializable {
height = m.length;
width = m[0].length;
}
private void checkBounds(int x, int y){
if(x < 0 || x > height || y < 0 || y > width) {
throw new ArrayIndexOutOfBoundsException("Trying to get tile at "+x+" , "+y+" but map has dimension "+height+" , "+width);
}
}
/**
*
*
* @return the height of the map in tiles
*/
public int getHeight(){return height; }
/**
*
*
* @return the width of the map in tiles
*/
public int getWidth(){
return width;
}
public MapPoint getPositionPlayerStart() {
return(positionPlayerAtStart);
}
public MapPoint getPositionStairs() {
return(stairsPosition);
}
/**
*
*
* @param x
* @param y
* @return Id of tile at position x, y in the map[][]
......@@ -88,7 +88,7 @@ public class Map implements Serializable {
return map[x][y].getType();
}
/**
*
*
* @param x
* @param y
* @return clone of tile at position x, y in map[][]
......@@ -158,15 +158,15 @@ public class Map implements Serializable {
}
return sb.toString();
}
public Tile getTileAt(MapPoint mapPoint) {
return getTileAt(mapPoint.getI(),mapPoint.getJ());
}
public Entity[] getEntities() {
return(entities);
}
public void generateEntities() {
MapPatterns.read();
int nbRooms=rooms.length;
......@@ -186,8 +186,6 @@ public class Map implements Serializable {
// entities[i]=new Character(posX,posY,100+i,100,SpeciesRoster.getMentaliSpecy(),"Monster "+i);
}
}
<<<<<<< HEAD
=======
public void addSomeCorridors() {
int nbRooms=rooms.length;
Random r=new Random();
......@@ -234,5 +232,4 @@ public class Map implements Serializable {
if(surface1.i1>surface2.i2+1 || surface2.i1>surface1.i2+1 || surface1.j1>surface2.j2+1 || surface2.j1>surface1.j2+1) return(false);
else return(true);
}
>>>>>>> 98db91f663fa9e6747af53343b2fc0e764aadaab
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment