建议代码的功能 [英] Suggestion for functionality of code
问题描述
我住在美国。我正在使用Visual Studio 2012 express。我编写了一个很像Hangman的程序,玩家必须猜出一个随机的单词。单词长度为3到15个字符。我听说玩家应该有大约8次猜测这个词的机会。我不希望玩家有8次机会获得不那么长的单词,看起来很傻。所以,我已经设置了一些代码来建立每个字长的默认机会数。我需要知道的是,对于长度为3到15个字符的单词,我应该使用哪些值作为默认值。对于8个字符或以上的单词,我认为不应该超过8次机会。我也允许玩家选择他们认为任何选定单词长度的更公平的机会数。有谁理解我,你会帮助我吗?
我尝试过的事情:
编码没问题。我已经设置了各种控件来使我的程序正常运行并且已经成功运行它。
I live in the US. I am using Visual Studio 2012 express. I have written a program a lot like Hangman where the player has to guess a random word. The word lengths are from 3 to 15 characters. I have heard that the player should get around 8 chances to guess the word. I don't want the player to get 8 chances for words that are not that long, seems silly. So, I have set up some code to establish "default" number of chances with each word length. What I need to know is what values I should use as defaults for words that are 3 to 15 characters in length. I don't think that I should go over 8 chances for words that are 8 characters or over. I am also allowing the player to select what they feel is a "more fair" number of chances for any selected word length. Does anyone understand me and will you help me?
What I have tried:
Coding is NO problem. I have set up various controls to make my program work and have been successful in getting it to function.
推荐答案
我不希望玩家获得8次不那么长的单词的机会
I don't want the player to get 8 chances for words that are not that long
Hangman是关于找到正确的字母,短的单词是并不比长的更容易,所以减少猜测数量可能不是一个好主意。
我的建议:允许对所有单词进行8次猜测。
出于测试目的,让你的程序选择一个小词和游戏,你需要解决多少错误的猜测?
用15个字母的单词做同样的事情,并比较每个10个字符的结果。
你真的有区别吗?
Hangman is about finding correct letters, short words are not easier than long ones, so reducing number of guesses may be not a so good idea.
My advice: allow the 8 guesses for all words.
For testing purpose, make your program choose a small word and play, how many wrong guesses do you need to solve it ?
Do the same with 15 letters words, and compare the results for 10 runs of each.
Do you get a real difference ?
这篇关于建议代码的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!