Skip to content

Commit

Permalink
Omit most fill-ins from FURBALL declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
dharmab committed Dec 19, 2024
1 parent a5d14a8 commit 25fc46d
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions pkg/composer/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,20 @@ func (c *Composer) composeGroup(group brevity.Group) (response NaturalLanguageRe

// Fill-in information

// Heavy and number of contacts
if group.Heavy() {
response.WriteBoth(", heavy")
}
contacts := c.composeContacts(group.Contacts())
response.WriteResponse(contacts)
isFurball := group.Declaration() == brevity.Furball

if !isFurball {
// Heavy and number of contacts
if group.Heavy() {
response.WriteBoth(", heavy")
}
contacts := c.composeContacts(group.Contacts())
response.WriteResponse(contacts)

if !group.High() {
if len(stacks) > 1 {
response.WriteBoth(", " + c.composeAltitudeFillIns(stacks))
if !group.High() {
if len(stacks) > 1 {
response.WriteBoth(", " + c.composeAltitudeFillIns(stacks))
}
}
}

Expand All @@ -103,16 +107,18 @@ func (c *Composer) composeGroup(group brevity.Group) (response NaturalLanguageRe
response.WriteBoth(strings.Join(group.Platforms(), ", "))
}

// High
if group.High() {
response.WriteBoth(", high")
}
if !isFurball {
// High
if group.High() {
response.WriteBoth(", high")
}

// Fast or very fast
if group.Fast() {
response.WriteBoth(", fast")
} else if group.VeryFast() {
response.WriteBoth(", very fast")
// Fast or very fast
if group.Fast() {
response.WriteBoth(", fast")
} else if group.VeryFast() {
response.WriteBoth(", very fast")
}
}

response.WriteBoth(".")
Expand Down

0 comments on commit 25fc46d

Please sign in to comment.