Updated actions, fix some lint issues and introduce translate package
testing / check and test (push) Failing after 9m19s

This commit is contained in:
2024-04-13 02:40:32 +00:00
parent d05fa2e90a
commit 04c5f52e6f
8 changed files with 128 additions and 35 deletions
+7 -3
View File
@@ -8,12 +8,12 @@ import (
"sort"
)
var TileTypes = [34]string{
var TileTypes []string = []string{
"1W", "2W", "3W", "4W", "5W", "6W", "7W", "8W", "9W",
"1T", "2T", "3T", "4T", "5T", "6T", "7T", "8T", "9T",
"1B", "2B", "3B", "4B", "5B", "6B", "7B", "8B", "9B",
"DO", "XI", "NA", "BE", "ZH", "FA", "BA"}
var tileHuaTypes = [8]string{"ME", "LA", "ZU", "JU", "CH", "XA", "QI", "DN"}
var TileHuaTypes []string = []string{"ME", "LA", "ZU", "JU", "CH", "XA", "QI", "DN"}
// Given two tiles, return if first tile is smaller the second tile, functions used as comparator for ordering
// Default order is: 万 < 条 < 饼 < 字(东西南北中发白)
@@ -184,7 +184,7 @@ func CheckXushuTile(tiles []string) ([][][]string, error) {
}
func TilesDividedToPatterns(tiles []string) error {
Sort(tiles)
_ = Sort(tiles)
var wan, tiao, bing, zi []string
for _, tile := range tiles {
switch tile[1] {
@@ -198,5 +198,9 @@ func TilesDividedToPatterns(tiles []string) error {
zi = append(zi, tile)
}
}
_, _ = CheckXushuTile(wan)
_, _ = CheckXushuTile(tiao)
_, _ = CheckXushuTile(bing)
log.Println(zi)
return nil
}