コード例 #1
0
ファイル: NoteBitMap.cs プロジェクト: xiaotan2/piano
 // one map fills another map means all 1s in "mapToFill" are present in "filler", while "filler" can have more 1s present.
 public bool Fill(NoteBitMap mapToFill)
 {
     for (int i = 0; i < bitMap.Length; i++)
     {
         if ((bitMap[i] & mapToFill.Bitmap[i]) != mapToFill.Bitmap[i])
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #2
0
ファイル: NoteBitMap.cs プロジェクト: xiaotan2/piano
 public bool Match(NoteBitMap compBitmap)
 {
     for (int i = 0; i < bitMap.Length; i++)
     {
         if ((bitMap[i] ^ compBitmap.Bitmap[i]) != 0)
         {
             return(false);
         }
     }
     return(true);
 }