package edu.xcdq;
import java.util.Random;
import java.util.Scanner;
/**
* @author yuhuicun
* @date 2021/4/15 10:35
*/
public class CaiQuanGameDemo {
Scanner input;
Random random;
GamePlayer c_cp;
GamePlayer g_cp;
int sum = 0;
{
//创建电脑的角色
c_cp= new GamePlayer();
input = new Scanner(System.in);
//创建玩家的角色
g_cp = new GamePlayer();
random = new Random();
}
public static void main(String[] args) {
CaiQuanGameDemo gd = new CaiQuanGameDemo();
gd.gameStart();
}
//定义一个视图
public void gameStart() {
System.out.println("******************");
System.out.println("*****猜拳游戏******");
System.out.println("******************");
System.out.println("出拳规则:1、剪刀 2、石头 3、布");
System.out.println("请选择对方角色:1、刘备 2、孙权 3、曹操");
int n = input.nextInt();
//调用电脑角色选择的方法
crole(n);
S