コード例 #1
0
        private void SetLaddersOnGame(List <List <int> > ladderIndices)
        {
            foreach (var ladderIndex in ladderIndices)
            {
                if (Ladders.Any(x => x.Start == ladderIndex[0]))
                {
                    //Skipping two Ladder starts at same point
                    continue;
                }

                Ladders.Add(new Ladder()
                {
                    Start = ladderIndex[0],
                    End   = ladderIndex[1]
                });
            }
        }
コード例 #2
0
 public void AddLadder(Ladder L)
 {
     Ladders.Add(L);
 }
コード例 #3
0
 public void SetupLadders(int down, int up)
 {
     Ladders.Add(down, up);
 }