Ejemplo n.º 1
0
 public bool BoardEqual(Mboard mb)
 {
     if (width == mb.width)
     {
         if (height == mb.height)
         {
             if (board.To1DList().SequenceEqual(mb.board.To1DList()))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
        public bool Equals(Mboard mb)
        {
            List <Players> brd   = board.Cast <Players>().ToList();
            List <Players> brd2  = mb.board.Cast <Players>().ToList();
            List <int>     dbrd  = databoard.Cast <int>().ToList();
            List <int>     dbrd2 = mb.databoard.Cast <int>().ToList();

            if (width == mb.width)
            {
                if (height == mb.height)
                {
                    if (brd.SequenceEqual(brd2))
                    {
                        if (dbrd.SequenceEqual(dbrd2))
                        {
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }