gpt4 book ai didi

java - 使用 Unicode 字符集显示多米诺骨牌

转载 作者:行者123 更新时间:2023-11-29 04:17:56 25 4
gpt4 key购买 nike

我目前正在用 Java 创建多米诺骨牌游戏。这个想法是加载多米诺骨牌图像,必要时旋转它们,然后将它们显示在屏幕上。几周前,我发布了一个问题,询问如何在 Java 中旋转 imageIcon。

Someone replied如下:“Unicode 字符集包括多米诺骨牌”。

所以如果我理解正确的话,我可以使用 Unicode 字符集在屏幕上显示多米诺骨牌而不是加载多米诺骨牌图像?我无法在 Internet 上找到任何如何执行此操作的示例。任何人都可以举例说明这是如何完成的吗?

最佳答案

多米诺骨牌由 U+1F030 到 U+1F09F 的 UTF8 字符表示。他们有一个特殊的 block 。

🀰🀱🀲🀳🀴🀵🀶🀷🀸🀹🀺🀻🀼🀽🀾🀿🁀🁁🁂🁃🁄🁅🁆🁇🁈🁉🁊🁋🁌🁍🁎🁏🁐🁑🁒🁓🁔🁕🁖🁗🁘🁙🁚🁛🁜🁝🁞🁟🁠🁡🁢🁣🁤🁥🁦🁧🁨🁩🁪🁫🁬🁭🁮🁯🁰🁱🁲🁳🁴🁵🁶🁷🁸🁹🁺🁻🁼🁽🁾🁿🂀🂁🂂🂃🂄🂅🂆🂇🂈🂉🂊🂋🂌🂍🂎🂏🂐 🂑 🂒 🂓 🂔 🂕 🂖 🤗 🂘 🂙 🂚 🂛 🂜 🂝 🂞 🂟

根据 https://unicode-table.com :

Domino Tiles is a Unicode block containing characters for representing game situations in dominoes. The block includes symbols for the standard six dot tile set and backs in horizontal and vertical orientations

参见 https://unicode-table.com/en/blocks/domino-tiles/

根据Unicode Standard, Version 10.0 :

The domino tile symbols do not represent the domino pieces per se, but instead constitute graphical symbols for particular orientations of the dominoes, because orientation of the tiles is significant in discussion of dominoes play. Each visually distinct rotation of a domino tile is separately encoded. Thus, for example, both U+1F081 domino tile vertical-04-02 and U+1F04F
domino tile horizontal-04-02 are encoded, as well as U+1F075 domino tile vertical-02-04 and U+1F043 domino tile horizontal-02-04. All four of those symbols represent the same game tile, but each orientation of the tile is visually distinct and requires its own symbol for text. The digits in the character names for the domino tile symbols reflect the dot patterns on the tiles.

您还必须选择能够显示它们的字体。

关于java - 使用 Unicode 字符集显示多米诺骨牌,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51109953/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com