Post History
Ruby, 110 106 bytes Fixed capitalization and refactored for -4. ->p,s{d=s-p s<2&&"Hole in one"||%w[Albatross Eagle Birdie Par Bogey Double Triple][d+3]+(d>1?" bogey":"")} Att...
Answer
#3: Post edited
# Ruby, 110 bytesFixed capitalization for no change in length.<pre><code class="lang-ruby">->p,s{k=%w[Albatross Eagle Birdie Par Bogey Double Triple]d=s-ps<2&&"Hole in one"||k[d+3]+(d>1?" bogey":"")}</code></pre>- [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY383TtCnSKq7NtVcujHXOSEkuK8ouLFVwT03NSFZwyi1IyUxUCEosUnPLTUysVXPJLk4DiIUWZBTmpsVwptsW6BVzFNkZqakoe-UCJzDyF_LxUpZqa7OgUbeNYbY0UO0N7JYUkkGYlKyUlzVqIrasLSkuKFdKiTXTMYyEiCxZAaAA)
- # Ruby, <del>110</del> 106 bytes
- Fixed capitalization and refactored for -4.
- ```ruby
- ->p,s{d=s-p
- s<2&&"Hole in one"||%w[Albatross Eagle Birdie Par Bogey Double Triple][d+3]+(d>1?" bogey":"")}
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY383TtCnSKq7NtVcujHXOSEkuK8ouLFVwT03NSFZwyi1IyUxUCEosUnPLTUysVXPJLk4DiIUWZBTmpsVwptsW6BVzFNkZqakoe-UCJzDyF_LxUpZqa7OgUbeNYbY0UO0N7JYUkkGYlKyUlzVqIrasLSkuKFdKiTXTMYyEiCxZAaAA)
#2: Post edited
- # Ruby, 110 bytes
Maybe not the best attempt, but I'm not sure how much better you can do in Ruby.- <pre><code class="lang-ruby">->p,s{k=%w[Albatross Eagle Birdie Par Bogey Double Triple]
- d=s-p
s<2&&"Hole in One"||k[d+3]+(d>1?" "+k[4]:"")}</code></pre>[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY383TtCnSKq7NtVcujHXOSEkuK8ouLFVwT03NSFZwyi1IyUxUCEosUnPLTUysVXPJLk4DiIUWZBTmpsVwptsW6BVzFNkZqakoe-UCJzDwF_7xUpZqa7OgUbeNYbY0UO0N7JQUl7exok1grJSXNWoitqwtKS4oV0qJNdAxjISILFkBoAA)
- # Ruby, 110 bytes
- Fixed capitalization for no change in length.
- <pre><code class="lang-ruby">->p,s{k=%w[Albatross Eagle Birdie Par Bogey Double Triple]
- d=s-p
- s<2&&"Hole in one"||k[d+3]+(d>1?" bogey":"")}</code></pre>
- [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY383TtCnSKq7NtVcujHXOSEkuK8ouLFVwT03NSFZwyi1IyUxUCEosUnPLTUysVXPJLk4DiIUWZBTmpsVwptsW6BVzFNkZqakoe-UCJzDyF_LxUpZqa7OgUbeNYbY0UO0N7JYUkkGYlKyUlzVqIrasLSkuKFdKiTXTMYyEiCxZAaAA)
#1: Initial revision
# Ruby, 110 bytes Maybe not the best attempt, but I'm not sure how much better you can do in Ruby. <pre><code class="lang-ruby">->p,s{k=%w[Albatross Eagle Birdie Par Bogey Double Triple] d=s-p s<2&&"Hole in One"||k[d+3]+(d>1?" "+k[4]:"")}</code></pre> [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY383TtCnSKq7NtVcujHXOSEkuK8ouLFVwT03NSFZwyi1IyUxUCEosUnPLTUysVXPJLk4DiIUWZBTmpsVwptsW6BVzFNkZqakoe-UCJzDwF_7xUpZqa7OgUbeNYbY0UO0N7JQUl7exok1grJSXNWoitqwtKS4oV0qJNdAxjISILFkBoAA)