文件名称:MasterMind
介绍说明--下载内容均来自于网络,请自行研究使用
Write a C++ program to implement the game MasterMind. Your code should perform the following.
i. Randomly place different values to an array of 4 integer values. The values placed
should be in the range 1 to 6.
ii. Allow a user to guess the number and computer should respond to the guess with clues.
• A “O” symbol means “right value, right position”. That is one of your digits has
the right value in the right position.
• A “#” symbol means “right value, wrong position”. That is one of your digits has
the right value, but is in the wrong position.
• If the computer responds with no pegs, that means everything is wrong.-Write a C++ program to implement the game MasterMind. Your code should perform the following.
i. Randomly place different values to an array of 4 integer values. The values placed
should be in the range 1 to 6.
ii. Allow a user to guess the number and computer should respond to the guess with clues.
• A “O” symbol means “right value, right position”. That is one of your digits has
the right value in the right position.
• A “#” symbol means “right value, wrong position”. That is one of your digits has
the right value, but is in the wrong position.
• If the computer responds with no pegs, that means everything is wrong.
i. Randomly place different values to an array of 4 integer values. The values placed
should be in the range 1 to 6.
ii. Allow a user to guess the number and computer should respond to the guess with clues.
• A “O” symbol means “right value, right position”. That is one of your digits has
the right value in the right position.
• A “#” symbol means “right value, wrong position”. That is one of your digits has
the right value, but is in the wrong position.
• If the computer responds with no pegs, that means everything is wrong.-Write a C++ program to implement the game MasterMind. Your code should perform the following.
i. Randomly place different values to an array of 4 integer values. The values placed
should be in the range 1 to 6.
ii. Allow a user to guess the number and computer should respond to the guess with clues.
• A “O” symbol means “right value, right position”. That is one of your digits has
the right value in the right position.
• A “#” symbol means “right value, wrong position”. That is one of your digits has
the right value, but is in the wrong position.
• If the computer responds with no pegs, that means everything is wrong.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
MasterMind.cpp