Editor Map don't display

This commit is contained in:
Yohann D'ANELLO 2020-04-04 22:22:20 +02:00
parent 031815e055
commit 3b55678835
2 changed files with 3 additions and 4 deletions

View File

@ -36,11 +36,11 @@ class GMap(val raw: RawMap) {
def getHeight: Int = height def getHeight: Int = height
def getCase(x: Int, y: Int): Case = casesMap.getOrElse(x, Map())(y) def getCase(x: Int, y: Int): Case = casesMap.getOrElse(x, Map()).getOrElse(y, null)
def getAllCases: List[Case] = { def getAllCases: List[Case] = {
val list = Nil: List[Case] var list = Nil: List[Case]
casesMap.values.foreach(l => list.appendedAll(l.values)) casesMap.values.foreach(l => list = list.appendedAll(l.values))
list list
} }

View File

@ -29,7 +29,6 @@ class MapMouseListener(val panel: MapPanel, val frame: EditorFrame) extends Mous
case _ => case _ =>
n = c n = c
} }
map.setCase(n.getPosX, n.getPosY, n) map.setCase(n.getPosX, n.getPosY, n)
panel.repaint() panel.repaint()