using System;
namespace ScissorsGame
{
/// <summary>
/// 玩家类
/// </summary>
class Player
{
public string playerPoint; //数据字段
public void Select() //玩家选择点数功能的方法
{
while (true)
{
Console.Clear();
Console.WriteLine(" 1-剪刀 2-石头 3-布");
Console.WriteLine("---------------------------");
Console.Write("请输入你的选择:");
string mySelect = Console.ReadLine();
if (mySelect == "1" || mySelect == "2" || mySelect == "3")
{
playerPoint = mySelect;
break;
}
else
C#控制台应用程序:剪刀石头布
于 2022-08-12 20:01:51 首次发布