Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DecryptedMessage ¶
type DecryptedMessage [4]int
func (*DecryptedMessage) ToInt ¶
func (m *DecryptedMessage) ToInt() int
type EncryptedMessage ¶
type EncryptedMessage struct { Key SegmentKey Message Message }
func (*EncryptedMessage) Decrypt ¶
func (s *EncryptedMessage) Decrypt() DecryptedMessage
type Message ¶
type Message [4]SegmentPattern
Message contains the encrypted four segment patterns in the message.
type SegmentCipher ¶
type SegmentCipher map[SegmentPattern]int
SegmentCipher is a map from encrypted segment patterns to their decrypted integer values.
func (*SegmentCipher) Decode ¶
func (c *SegmentCipher) Decode(p SegmentPattern) int
func (*SegmentCipher) GetPattern ¶
func (c *SegmentCipher) GetPattern(n int) SegmentPattern
type SegmentKey ¶
type SegmentKey map[int][]SegmentPattern
SegmentKey contains all of the possible segment patterns 0-9. They are stored in a map, where the key is the pattern length.
func (*SegmentKey) GetCipher ¶
func (p *SegmentKey) GetCipher() SegmentCipher
type SegmentPattern ¶
SegmentPattern is a set containing all of the runes that make up the signals which constitute a digit on a seven segment display
Click to show internal directories.
Click to hide internal directories.