对 Python 战舰游戏 GUI 的看法 [英] Opinion on GUI for a Battleship game in Python
问题描述
我正在为一个项目制作战舰游戏.虽然我已经完成了逻辑并且游戏可以使用文本输入.我希望制作一个(非常基本的)GUI,同时仍然使用为文本创建的方法.
I am making a battleship game for a project. While I have completed the logic and the game works with text input. I was hoping make a (very basic) GUI while still use the methods created for the text.
我一直在寻找的两个选项是 PyGame 和 Tkinter.PyGame 似乎没有文本输出/标签功能.Tkinter 确实如此,但它似乎并不像 PyGame 那样容易(我觉得).
The two options I've been looking at are PyGame and Tkinter. PyGame does not seem to have a text output/label function. Tkinter does, but it doesn't seem as easy (i feel) as PyGame is.
虽然我很乐意为这两个框架中的任何一个提供它们应得的时间,但我还有 60 多小时的时间.
Though I would love to give either of these frameworks the time they deserve, I have just over 60hrs before this is due.
我想知道是否有人有任何经验或见解,以及这是否是一个现实的选择.
I wanted to know if anyone one has any experience or insights and if it is a realistic option.
一如既往的感谢!
推荐答案
这在 Tkinter 中是一件相当琐碎的事情.战舰游戏显示一系列坐标,您可以将其显示为复选按钮网格.
This is a fairly trivial thing to do in Tkinter. A battleship game shows an array of coordinates which you can display as a grid of checkbuttons.
这篇关于对 Python 战舰游戏 GUI 的看法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!