猜拳游戏.docx
《猜拳游戏.docx》由会员分享,可在线阅读,更多相关《猜拳游戏.docx(6页珍藏版)》请在冰豆网上搜索。
![猜拳游戏.docx](https://file1.bdocx.com/fileroot1/2023-5/31/be3eb013-e625-487c-9e6e-dc55ab08f4ca/be3eb013-e625-487c-9e6e-dc55ab08f4ca1.gif)
猜拳游戏
三一文库(XX)
〔猜拳游戏〕
*篇一:
猜拳游戏
Orff音乐活动教案
活动反馈:
本节课是一节节奏打击乐活动,幼儿对与节奏和节拍的认识不够,在开展活动的时候对一些乐理知识的渗透要多一点。
在玩游戏的环节,幼儿很快上手,但是音乐太快跟不上节奏。
还有就是上课常规和乐器使用的常规要继续加强训练。
*篇二:
猜拳游戏
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespace尼玛的猜拳游戏
{
publicenumMode
{
玩家对战,人机对战
}
publicenumGesture
{
石头=0,剪刀=1,布=2
}
publicenumRole
{
前田敦子,板野友美,渡边麻友
}
classGame
{
publicstaticintAgainstTheNumber=0;对战次数
publicstaticstring[]player=newstring[2];游戏中的两个对手
publicstaticint[]victory={0,0};每个对手胜利的次数
publicstaticstring[]huaQuan=newstring[2];每个对手每次的出拳
publicstaticvoidStartInterface()游戏开始界面设置
{
Console.WriteLine("****************************欢迎进入游戏世界
*****************************");
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("***********************");
Console.WriteLine("**猜拳开始**");
Console.WriteLine("***********************");
Game.SelectMode();
}
publicstaticvoidSelectMode()对战模式选择
{
intchoose;
do
{
Console.WriteLine("请选择对战模式:
");
Console.WriteLine("1.{0}\t\t2.{1}",Mode.人机对战,Mode.玩家对战);
choose=int.Parse(Console.ReadLine());
switch(choose)
{
case1:
Console.WriteLine(Mode.人机对战.ToString());
Game.Start(Mode.人机对战.ToString());
break;
case2:
Console.WriteLine(Mode.玩家对战.ToString());
Game.Start(Mode.玩家对战.ToString());
break;
default:
Console.WriteLine("输入错误,请重新选择");
continue;
}
}while(choose2);
}
publicstaticvoidStart(stringmode)调用角色选择
{
if(mode==Mode.人机对战.ToString())
{
Player.SelectRoles();
}
else
{
Player.SelectRoles(mode);
}
}
publicstaticvoidCompare()人机对战划拳结果比较
{
AgainstTheNumber++;
if((huaQuan[0]==Gesture.布.ToString()huaQuan[1]==Gesture.剪刀.ToString())||
(huaQuan[0]==Gesture.剪刀.ToString()huaQuan[1]==Gesture.石头.ToString())||
(huaQuan[0]==Gesture.石头.ToString()huaQuan[1]==Gesture.布.ToString()))
{
victory[1]++;
Console.WriteLine("高桥南胜利!
请再接再厉!
!
!
");
}
elseif((huaQuan[0]==Gesture.布.ToString()huaQuan[1]==Gesture.布.ToString())||
(huaQuan[0]==Gesture.剪刀.ToString()huaQuan[1]==Gesture.剪刀.ToString())||
(huaQuan[0]==Gesture.石头.ToString()huaQuan[1]==Gesture.石头.ToString()))
{
Console.WriteLine("打成平手!
!
不服再战!
!
!
");
}
else
{
victory[0]++;
Console.WriteLine(player[0]+"胜利!
恭喜恭喜!
!
!
");
}
}
publicstaticvoidCompare(stringhuaQuan1,stringhuaQua2)玩家对战划拳结果比较
{
AgainstTheNumber++;
if((huaQuan[0]==Gesture.布.ToString()huaQuan[1]==Gesture.剪刀.ToString())||
(huaQuan[0]==Gesture.剪刀.ToString()huaQuan[1]==Gesture.石头.ToString())||
(huaQuan[0]==Gesture.石头.ToString()huaQuan[1]==Gesture.布.ToString()))
{
victory[1]++;
Console.WriteLine(player[1]+"胜利!
恭喜恭喜!
!
!
");
}
elseif((huaQuan[0]==Gesture.布.ToString()huaQuan[1]==Gesture.布.ToString())||
(huaQuan[0]==Gesture.剪刀.ToString()huaQuan[1]==Gesture.剪刀.ToString())||
(huaQuan[0]==Gesture.石头.ToString()huaQuan[1]==Gesture.石头.ToString()))
{
Console.WriteLine("打成平手!
!
不服再战!
!
!
");
}
else
{
victory[0]++;
Console.WriteLine(player[0]+"胜利!
恭喜恭喜!
!
!
");
}
}
publicstaticvoidLast()最后总结
{
Console.WriteLine("\n************比赛结果****************");
Console.WriteLine("\n"+player[0]+"VS"+player[1]);
Console.WriteLine("对战次数:
"+AgainstTheNumber);
if(victory[0]victory[1])
{
Console.WriteLine("{0}胜利,胜利次数是:
{1}",player[0],victory[0]);
}
elseif(victory[0]victory[1])
{
Console.WriteLine("{0}胜利,胜利次数是:
{1}",player[1],victory[1]);
}
else
{
Console.WriteLine("{0}与{1}打成平手,相约下次再战!
!
",player[0],player[1]);
}
Console.WriteLine("\n———————————————————————————————————————");
Console.WriteLine("———————————————————————————————————————");Console.WriteLine("****************************游戏结束!
!
*****************************");Console.ReadLine();
}
}
classPlayer
{
publicstring[]role=newstring[3];
publicPlayer()对角色赋值
{
role[0]=Role.前田敦子.ToString();
role[1]=Role.板野友美.ToString();
role[2]=Role.渡边麻友.ToString();
}
publicstaticvoidSelectRoles()人机对战模式选择角色
{
Playerplayers=newPlayer();
intchoose;
do
{
Console.WriteLine("请玩家选择角色(1.{0}\t2.{1}\t3.{2})",players.role[0],players.role[1],players.role[2]);
choose=int.Parse(Console.ReadLine());
switch(choose)
{
case1:
Game.player[0]=players.role[0];
Console.WriteLine("\n您选择的角色是:
"+Game.player[0]);
break;
case2:
Game.player[0]=players.role[1];
Console.WriteLine("\n您选择的角色是:
"+Game.player[0]);
break;
case3:
Game.player[0]=players.role[2];
Console.WriteLine("\n您选择的角色是:
"+Game.player[0]);
break;
default:
Console.WriteLine("没有这个选项,请重新输入!
!
");
break;
}
}while(choose3);
Game.player[1]="高桥南";
HuaQuan();
}
publicstaticvoidSelectRoles(stringmode)玩家对战角色选择
{
《猜拳游戏》