| public static void game(){ Scanner sc = new Scanner(System.in);
 Scanner sc1 = new Scanner(System.in);
 while (true) {
 System.out.println("欢迎光临费玉污减肥中心。");
 System.out.println("本中心的减肥项目分500,1000,1500三种价位,请问您选择哪种价位?");
 int number = sc.nextInt();
 switch (number) {
 case 500 :
 System.out.println("好的先生,请拿好钥匙从1号门进入。");
 System.out.println("是否打开1号门?");
 String yesOrNo = sc1.nextLine();
 if (yesOrNo.equals("是") || yesOrNo.equals("yes")||yesOrNo.equals("shi")) {
 System.out.println("你打开门,看到一个美女,穿着三点式坐在椅子上。");
 System.out.println("美女对你说: \"你追我,如果你追到我,我就让你嘿嘿嘿~\"");
 System.out.println("追还是不追?");
 String zOrBz = sc1.nextLine();
 if (zOrBz.equals("追") ||zOrBz.equals("yes")||zOrBz.equals("zhui")) {
 System.out.println("恭喜追到美女,成功嘿嘿嘿,并减重2斤!");
 }else {
 System.out.println("怂,你就一辈子不行。");
 }
 }else {
 System.out.println("本店概不退款,先生再见。");
 }
 break;
 case 1000 :
 System.out.println("请问您是否体验过500元价位?");
 String tyOrMty = sc1.nextLine();
 if (tyOrMty.equals("是")||tyOrMty.equals("yes")||tyOrMty.equals("shi")) {
 System.out.println("好的先生,请拿好钥匙从2号门进入。");
 System.out.println("   \"你毫不犹豫的打开了2号门!\"");
 System.out.println("   \"你毫不犹豫的打开了2号门!\"");
 System.out.println("   \"你毫不犹豫的打开了2号门!\"");
 System.out.println("你打开门,看到一个更漂亮的美女坐在椅子上,这次连三点式都没穿。");
 System.out.println("美女对你说: \"你追我,如果你追到我,我就让你嘿嘿嘿~\"");
 System.out.println("追还是不追?");
 String zOrBz1 = sc1.nextLine();
 if (zOrBz1.equals("追") ||zOrBz1.equals("yes")||zOrBz1.equals("zhui")) {
 System.out.println("恭喜追到美女,成功嘿嘿嘿,并减重4斤!");
 }else {
 System.out.println("上次累着了?减肥要持之以恒,坚持不泄啊!");
 }
 }else {
 System.out.println("抱歉先生,减肥需要循序渐进,请先体验500元价位。");
 }
 break;
 case 1500 :
 System.out.println("请问您是否体验过500元和1000元价位?");
 String tyOrMty1 = sc1.nextLine();
 if (tyOrMty1.equals("是")||tyOrMty1.equals("yes")||tyOrMty1.equals("shi")) {
 System.out.println("好的先生,请拿好钥匙从3号门进入。");
 System.out.println("不用说了,我是老顾客,都清楚!");
 System.out.println("   \"你猴急的打开了3号门!并顺手把门锁上\"");
 System.out.println("你打开门,看到一只黑猩猩,穿着三点式坐在椅子上。");
 System.out.println("猩猩对你说: \"我追你,如果我追到你,我就把你嘿嘿嘿~\"");
 System.out.println("跑还是不跑?");
 String zOrBz2 = sc1.nextLine();
 if (zOrBz2.equals("跑") ||zOrBz2.equals("yes")||zOrBz2.equals("pao")) {
 System.out.println("   \"生命不息\"");
 System.out.println("   \"运动不止\"");
 System.out.println("   \"门也不开\"");
 }else {
 System.out.println("攻守兼备 人兽不侵");
 }
 }else {
 System.out.println("抱歉先生,减肥需要循序渐进,请先体验500元和1000元价位。");
 }
 break;
 default :
 System.out.println("抱歉,我们还没有推出该项目。");
 }
 System.out.println("请输入quit返回主菜单或输入任意键继续本游戏:");
 Scanner sca = new Scanner(System.in);
 String isquit = sca.nextLine();
 if (isquit.equals("quit")) {
 System.out.println();
 playGame();
 }
 }
 }
 |