diff --git a/src/main/scala/scatan/model/map/GameMap.scala b/src/main/scala/scatan/model/GameMap.scala similarity index 93% rename from src/main/scala/scatan/model/map/GameMap.scala rename to src/main/scala/scatan/model/GameMap.scala index f22e6456..e9c28aca 100644 --- a/src/main/scala/scatan/model/map/GameMap.scala +++ b/src/main/scala/scatan/model/GameMap.scala @@ -1,9 +1,10 @@ -package scatan.model.map +package scatan.model import scatan.utils.UnorderedTriple import scatan.utils.UnorderedTriple.given import scatan.utils.UnorderedPair import scatan.model.map.HexTiledMap.* +import scatan.model.map.{Hexagon, HexTiledMap, UndirectedGraph} /** A Spot is unique identified by three hexagons in the map. * diff --git a/src/test/scala/scatan/model/map/GameMapTest.scala b/src/test/scala/scatan/model/map/GameMapTest.scala index dcd51c9d..305b2947 100644 --- a/src/test/scala/scatan/model/map/GameMapTest.scala +++ b/src/test/scala/scatan/model/map/GameMapTest.scala @@ -4,10 +4,11 @@ import scatan.BaseTest import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import scatan.utils.UnorderedPair import scatan.utils.UnorderedTriple +import scatan.model.{Spot, GameMap} class GameMapTest extends BaseTest with ScalaCheckPropertyChecks: - val rangeToTest: Range = 0 to 5 + val rangeToTest: Range = 0 to 4 "Hexagonal tiles in GameMap" should "obey to cubic coordinates rules" in { rangeToTest foreach { (layer: Int) => diff --git a/src/test/scala/scatan/utils/UnorderedTupleTest.scala b/src/test/scala/scatan/utils/UnorderedTupleTest.scala index 697cfc34..c48fc757 100644 --- a/src/test/scala/scatan/utils/UnorderedTupleTest.scala +++ b/src/test/scala/scatan/utils/UnorderedTupleTest.scala @@ -34,7 +34,7 @@ class UnorderedPairTest extends BaseTest with ScalaCheckPropertyChecks: it should "be not equals if, at least, one element is different" in { val itemsInPair = 2 forAll { (a1: Int, b1: Int, a2: Int, b2: Int) => - whenever(Set(a1, b1).intersect(Set(a2, b2)).sizeIs < itemsInPair) { + whenever((Set(a1, b1) | Set(a2, b2)).sizeIs > itemsInPair) { val pair1 = UnorderedPair(a1, b1) val pair2 = UnorderedPair(a2, b2) pair1 should not be pair2 @@ -70,7 +70,7 @@ class UnorderedTripleTest extends BaseTest with ScalaCheckPropertyChecks: it should "be not equals if, at least, one element is different" in { val itemsInTriple = 3 forAll { (a1: Int, b1: Int, c1: Int, a2: Int, b2: Int, c2: Int) => - whenever(Set(a1, b1, c1).intersect(Set(a2, b2, c2)).sizeIs < itemsInTriple) { + whenever((Set(a1, b1, c1) | Set(a2, b2, c2)).sizeIs > itemsInTriple) { val triple1 = UnorderedTriple(a1, b1, c1) val triple2 = UnorderedTriple(a2, b2, c2) triple1 should not be triple2