Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with 2 Dimensional Array  RSS feed

 
Jack Sloan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class which is taking a monte carlo simulation and run through i iterations of the code to determine the energy reduced and represent it graphically.
My problem that I am getting stumped at is drawing my second 2x2 array reflecting the changes eg swapping the two elements of the array when the swapEnergy is less than the initialEnergy. If someone can point me in the right direction on how to draw this second two dimensional array I would be greatly thankful.

 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a lot of code and quite complex. I would advise you to create some test cases, set some assert statements and go through the code. Basically debug.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!