Expand|Select|Wrap|Line Numbers
- static void SpinOneCard(board tb, ref OneSavedBoard osb, int SrcCol, int SrcCard, int DesCol, int DesCard)
- {
- tb.nSpins = 0;
- osb.moveto(ref tb , SrcCol, SrcCard, DesCol, DesCard);
- osb.init(ref tb, BoardSeries.Count);
- BoardSeries.Add(osb);
- }
Expand|Select|Wrap|Line Numbers
- {
- OneSavedBoard osb = new OneSavedBoard();
- tb.nSpins++;
- SpinOneCard(tb, ref osb, iColumn, nCard, i, DesLoc);
- }
I started off with a simple struct for "board" but ended up added all sorts of stuff to it.
Expand|Select|Wrap|Line Numbers
- public struct board
- {
- public column[] ThisColumn;
- public int score;
- public int from;
- public void init()
- {
- int i;
- ThisColumn = new column[11];
- for (i = 0; i < 11; i++)
- ThisColumn[i].init();
- ..etc.. same for that column[] it also contains a lot of code
SOLVED - The part I was testing was a reference, everything else was passed by value. SoRRy-mY BAd