Winform实现石头剪刀布小游戏
1、电脑玩家类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RockScissorsClothApp
{
public class Computer
{
public Card Play()
{
Random random = new Random();
int num = random.Next(0, 3);
switch (num)
{
case 0:
return Card.Rock;
case 1:
return Card.Scissors;
default:
return Card.CLoth;
}
}
public static string ToString(Card c)