Python Gui:哪个框架最适合显示数组

发布于 2024-10-09 17:02:01 字数 124 浏览 0 评论 0原文

我想知道哪个 gui 库适合显示迷宫(NxN 数组)并能够用颜色填充每个单元格来表示该单元格的状态。我还将生成一条从迷宫的一部分到另一部分的路径,并希望显示这样的路径。

我需要为此选择一个 Gui 框架。有什么建议吗?

I was wondering which gui library would be appropriate to display a maze (a NxN array) and being able to fill each cell with a colour to represent states of that cell. I will also be generating a path from one part of the maze to another, and would like to display such path.

I need to choose a Gui framework for this. Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紧拥背影 2024-10-16 17:02:01

pygame 是一个不错的游戏库,但在这里也很有用。您可以从简单地画正方形开始。稍后,如果您想让代码更具视觉吸引力,您可以更改代码以使用精灵。

查看一些使用 pygame 编写的迷宫游戏示例。

pygame is a nice library for making games but could also be useful here. You can start simple by just drawing squares. Later you can change the code to use sprites if you want to make it more visually appealing.

Check out some of the examples of maze games written using pygame.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文