Comments and answers for "Need Equation to flip 5x5 Matrix"
http://answers.unity.com/questions/470861/need-equation-to-flip-5x5-matrix.html
The latest comments and answers for the question "Need Equation to flip 5x5 Matrix"Comment by Owen-Reynolds
http://answers.unity.com/comments/471108/view.html
If you can handle the programming, a 2-dimensional array is much better. In C# something like `int[,] = new int[5,5];`. Do you just have 25 variables, now?
With large ifs/switches it's so easy to have one tiny mistake -- position 2,4 swaps with 2,2 instead of 2,1 -- which doesn't show up in testing. Loops over arrays either break big-time, or work perfectly. Plus much easier to go to a 6x6 board.Sat, 08 Jun 2013 15:00:04 GMTOwen-ReynoldsComment by azmundai
http://answers.unity.com/comments/470911/view.html
hmm cool, I was hoping for something more elegant but that should work. Though I think I am going to just make a huge Switch/Case instead of 4 arrays. Thanks tho!Sat, 08 Jun 2013 05:23:00 GMTazmundaiComment by Owen-Reynolds
http://answers.unity.com/comments/470890/view.html
So, want to switch row 0 with row 4, and row 1 with row 3?
If so, that's super-easy. Just a single loop and swap A[i][0] with A[i][4].Sat, 08 Jun 2013 03:48:39 GMTOwen-Reynolds