diff --git a/ObjectMaze/pom.xml b/ObjectMaze/pom.xml
new file mode 100644
index 0000000..5060507
--- /dev/null
+++ b/ObjectMaze/pom.xml
@@ -0,0 +1,13 @@
+
+
+ 4.0.0
+ com.mycompany
+ ObjectMaze
+ 1.0-SNAPSHOT
+ jar
+
+ UTF-8
+ 1.8
+ 1.8
+
+
\ No newline at end of file
diff --git a/ObjectMaze/src/main/java/com/mycompany/objectmaze/Celda.java b/ObjectMaze/src/main/java/com/mycompany/objectmaze/Celda.java
new file mode 100644
index 0000000..28e4721
--- /dev/null
+++ b/ObjectMaze/src/main/java/com/mycompany/objectmaze/Celda.java
@@ -0,0 +1,32 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.mycompany.objectmaze;
+
+/**
+ *
+ * @author japar
+ */
+public abstract class Celda implements Pintable {
+ private int x,y;
+
+ public Celda(int x, int y) {
+ this.x = x;
+ this.y = y;
+ }
+
+
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+
+
+}
diff --git a/ObjectMaze/src/main/java/com/mycompany/objectmaze/Laberinto.java b/ObjectMaze/src/main/java/com/mycompany/objectmaze/Laberinto.java
new file mode 100644
index 0000000..73fd5c1
--- /dev/null
+++ b/ObjectMaze/src/main/java/com/mycompany/objectmaze/Laberinto.java
@@ -0,0 +1,116 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.mycompany.objectmaze;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ *
+ * @author japar
+ */
+public class Laberinto implements Pintable {
+ public static final Map CELDAS_POR_DEFECTO=new HashMap<>();
+ static{
+ CELDAS_POR_DEFECTO.put("/",0.5);
+ CELDAS_POR_DEFECTO.put("\\", 0.5);
+ }
+ public static final String paredHorizonal="_";
+ public static final String paredVertical="|";
+
+ private Celda[][] celdas;
+ private Usuario usuario;
+ private Tesoro tesoro;
+
+ public Laberinto(int filas, int columnas){
+ this(filas,columnas,CELDAS_POR_DEFECTO);
+ }
+
+ public Laberinto(int filas, int columnas, Map probabilidad){
+ celdas=new Celda[filas+2][columnas+2];
+ generarCeldas(probabilidad);
+ generarUsuario();
+ generarTesoro();
+ }
+
+ private void generarCeldas(Map probabilidad) {
+ for(int i=0;i0.5?0:(celdas.length-1);
+ usuario=new Usuario(x, y);
+ celdas[x][y]=usuario;
+ }
+
+
+ private void generarTesoro() {
+ int x = 0;
+ int y = 0;
+
+ do {
+ x=1+(int)(Math.random()*(celdas[0].length-1));
+ }
+ while(x==0 || x==celdas[0].length-1);
+
+ do {
+ y=1+(int)(Math.random()*(celdas.length-1));
+ }
+ while(y==0 || y==celdas.length-1);
+
+ tesoro=new Tesoro(x, y);
+ celdas[x][y]=tesoro;
+ }
+
+ private Celda generarInterior(int x, int y, Map probabilidad) {
+ String tipo=escogerPared(probabilidad);
+ return new Pared(x,y,tipo);
+ }
+
+ private String escogerPared(Map probabilidad) {
+ double total=probabilidad.values().stream().collect(Collectors.summingDouble(Double::doubleValue));
+ double random=Math.random()*total;
+ double conteo=0;
+ String result=null;
+ for(String key:probabilidad.keySet()){
+ conteo+=probabilidad.get(key);
+ result=key;
+ if(conteo>=random)
+ break;
+ }
+ return result;
+ }
+
+ public String toString(){
+ return "Laberinto de "+celdas.length+" por "+celdas[0].length;
+
+ }
+
+ public void pintar()
+ {
+ for(int i=0;i