//============================================================================== // Walk the list, calling the Move() method of each Pellet //============================================================================== public void Move() { Pellet nodeWalker = headPointer; while (nodeWalker != null) { nodeWalker.Move(); nodeWalker = nodeWalker.Next; } }
//============================================================================== // Walk the list, calling the Move() method of each Pellet //============================================================================== public void Move() { Pellet walker = headPointer; while (walker != null) { walker.Move(); walker = walker.Next; } }
//============================================================================== // Walk the list, calling the Move() method of each Pellet //============================================================================== public void Move() { Pellet pelletWalker = headPointer; while (pelletWalker != null) { pelletWalker.Move(); pelletWalker = pelletWalker.Next; } }
//============================================================================== // Walk the list, calling the Move() method of each Pellet //============================================================================== public void Move() { Pellet current = headPointer; while (current != null) { current.Move(); current = current.Next; } }
//============================================================================== // Walk the list, calling the Move() method of each Pellet //============================================================================== public void Move() { // Assign the pelletWalker to reference the same pellet as headPointer Pellet pelletWalker = headPointer; while (pelletWalker != null) { pelletWalker.Move(); pelletWalker = pelletWalker.Next; } }