playMaker

Author Topic: ArrayList Shift Left/Right  (Read 1742 times)

Frogspasm

  • Playmaker Newbie
  • *
  • Posts: 7
ArrayList Shift Left/Right
« on: April 11, 2015, 04:05:26 AM »
Hi everyone,

I need to do a circular shift on an array list. Shift left deletes the first entry then copies it to the end. Shift right deletes the last entry and copies it to the start.

I used ArrayListShuffle as a starting point and modified it.
It seems to work fine. I've only tested it with a boolean array list, but it should work for any kind. I'm a beginner at c#, so if anyone has another method that would be more efficient, feel free to update it.

Cheers,
Mike D.
« Last Edit: April 11, 2015, 04:07:28 AM by Frogspasm »