dlemstra / dlemstra/QRCodeCore
Lack patten methods in MaskPattern, won't work
- Dominant language
- C#
- Stars
- 24
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
In the MaskPattern Class, there is no patten method.
Should add these patten methods, which are copied from QRCode:
```
private static class MaskPattern
{
public static bool Pattern1(int x, int y)
{
return (x + y) % 2 == 0;
}
public static bool Pattern2(int x, int y)
{
return y % 2 == 0;
}
public static bool Pattern3(int x, int y)
{
return x % 3 == 0;
}
public static bool Pattern4(int x, int y)
{
return (x + y) % 3 == 0;
}
public static bool Pattern5(int x, int y)
{
return ((int)(Math.Floor(y / 2d) + Math.Floor(x / 3d)) % 2) == 0;
}
public static bool Pattern6(int x, int y)
{
return ((x * y) % 2) + ((x * y) % 3) == 0;
}
public static bool Pattern7(int x, int y)
{
return (((x * y) % 2) + ((x * y) % 3)) % 2 == 0;
}
public static bool Pattern8(int x, int y)
{
return (((x + y) % 2) + ((x * y) % 3)) % 2 == 0;
}
public static int Score(ref QRCodeMatrix qrCode)
{
\\ ...
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.