diff --git a/core/src/love/distributedrebirth/demo4d/base2t/BaseNumber.java b/core/src/love/distributedrebirth/demo4d/base2t/BaseNumber.java index 53af3a11..aadbf1ac 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/BaseNumber.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/BaseNumber.java @@ -5,6 +5,12 @@ import java.util.List; public interface BaseNumber> { + int getBitCount(); + + default int getSliceAngle() { + return 360/getBitCount(); + } + V toClone(); void fillOctalValues(T08PartOctalBaseAppender appender); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java b/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java index 86ffdc0e..2b1ec930 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/T08PartOctal.java @@ -15,6 +15,7 @@ public enum T08PartOctal implements BasePartIdentifierAlt, BasePartIdentifierTon ; public static int LENGTH = 8; + public static int BIT_COUNT = 3; private static final byte BITMASK = 0x07; private final String identifier; private final String identifierAlt; // absolute diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V003Timble.java b/core/src/love/distributedrebirth/demo4d/base2t/V003Timble.java index 43ab7322..be0a4b71 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V003Timble.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V003Timble.java @@ -24,6 +24,11 @@ public final class V003Timble implements BaseNumber { return value; } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT; + } + @Override public V003Timble toClone() { return new V003Timble(getValue()); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java b/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java index d3974973..cb4625ca 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V006Tixte.java @@ -24,12 +24,17 @@ public final class V006Tixte implements BaseNumber { public void setValue(T02PartBinary part, V003Timble value) { values[part.ordinal()] = value; } - + + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T02PartBinary.LENGTH; + } + @Override public V006Tixte toClone() { return new V006Tixte(cloneIterator()); } - + @Override public void fillOctalValues(T08PartOctalBaseAppender appender) { T02PartBinary.forEach(v -> getValue(v).fillOctalValues(appender)); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java b/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java index 08add87c..7094fdd1 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V009Tyte.java @@ -30,6 +30,11 @@ public final class V009Tyte implements BaseNumberTyte { values[part.ordinal()] = value; } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T03PartTrit.LENGTH; + } + @Override public V009Tyte toClone() { return new V009Tyte(cloneIterator()); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java b/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java index 3da89b85..2aef6615 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V018Tord.java @@ -37,6 +37,11 @@ public final class V018Tord implements BaseNumberTyte { getValue(part.splitPartBinary()).setValue(part.splitPartTrit(), value);; } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T06PartSeximal.LENGTH; + } + @Override public V018Tord toClone() { return new V018Tord(cloneIterator()); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java b/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java index bab77a3a..b017e1a6 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V027Temvig.java @@ -30,6 +30,11 @@ public final class V027Temvig implements BaseNumberTyte { values[part.ordinal()] = value; } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T03PartTrit.LENGTH * T03PartTrit.LENGTH; + } + @Override public V027Temvig toClone() { return new V027Temvig(cloneIterator()); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java b/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java index 7c42f758..d32eba64 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V036Teger.java @@ -39,6 +39,11 @@ public final class V036Teger implements BaseNumberTyte { .setValue(part.splitPartBinary(T02PartBinary.PART_2), value); } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH; + } + @Override public V036Teger toClone() { return new V036Teger(cloneIterator()); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java b/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java index aa5e789a..033bb0f3 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V072Tong.java @@ -29,6 +29,11 @@ public final class V072Tong implements BaseNumberTyte { values[part.ordinal()] = value; } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH * T02PartBinary.LENGTH; + } + @Override public V072Tong toClone() { return new V072Tong(cloneIterator()); diff --git a/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java b/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java index 39f1c6d6..f21baf41 100644 --- a/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java +++ b/core/src/love/distributedrebirth/demo4d/base2t/V144Tocta.java @@ -55,6 +55,11 @@ public final class V144Tocta implements BaseNumberTyte { .setValue(part.splitPartBinary(T03PartTrit.PART_3), value); } + @Override + public int getBitCount() { + return T08PartOctal.BIT_COUNT * T12PartUncial.LENGTH * T04PartQuad.LENGTH; + } + @Override public V144Tocta toClone() { return new V144Tocta(cloneIterator());