瀏覽代碼

Let's keep it short

Piotr Czajkowski 3 年之前
父節點
當前提交
ab0351deb2
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      app.go

+ 1 - 5
app.go

@@ -76,11 +76,7 @@ func decodeWord(word []rune, wordLength int, encodedWords []string) (string, []s
 			continue
 		}
 
-		if word[0] != encoded[0] {
-			continue
-		}
-
-		if word[wordLength-1] != encoded[wordLength-1] {
+		if word[0] != encoded[0] || word[wordLength-1] != encoded[wordLength-1] {
 			continue
 		}