Skip to content

Commit

Permalink
chore: edit main configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomoaccursi committed Dec 1, 2023
1 parent 4b7238f commit 4fa933f
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions src/main/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,20 @@ fun main() {
val linkingRule = PositionLinkingRule(4.0)

val environment = EnvironmentImpl(linkingRule)
val node1 = NodeImpl(
1,
contents = arrayListOf(ContentImpl(1)),
)
val node2 = NodeImpl(
2,
contents = arrayListOf(ContentImpl(1)),
)
val node3 = NodeImpl(
3,
contents = arrayListOf(ContentImpl(1)),
)
val node4 = NodeImpl(
4,
contents = arrayListOf(ContentImpl(1)),
)
val node1 = NodeImpl(1)
node1.addContent(ContentImpl(1))
val node2 = NodeImpl(2)
node2.addContent(ContentImpl(1))
val node3 = NodeImpl(3)
node3.addContent(ContentImpl(1))
val node4 = NodeImpl(4)
node4.addContent(ContentImpl(1))
listOf(node1, node2, node3, node4).forEach { node ->
environment.addNode(
node,
Position(0.0, 0.0),
)
}
environment.neighborhoods.forEach {
println("node: ${it.getCenter().id}, neighbors = ${it.getNeighbors().map { node -> node.id }}")
}
val moveAction = MoveNodeAction(environment)
val sumAction = SumAction(environment)
val event1 = EventImpl(
Expand Down

0 comments on commit 4fa933f

Please sign in to comment.