|
篇一:猜拳游戏
Orff音乐活动教案
活动反馈:
本节课是一节节奏打击乐活动,幼儿对与节奏和节拍的认识不够,在开展活动的时候对一些乐理知识的渗透要多一点。在玩游戏的环节,幼儿很快上手,但是音乐太快跟不上节奏。还有就是上课常规和乐器使用的常规要继续加强训练。
篇二:猜拳游戏
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 尼玛的猜拳游戏
{
public enum Mode
{
玩家对战, 人机对战
}
public enum Gesture
{
石头 = 0, 剪刀 = 1, 布 = 2
}
public enum Role
{
前田敦子, 板野友美, 渡边麻友
}
class Game
{
public static int AgainstTheNumber = 0;//对战次数
public static string[] player = new string[2];//游戏中的两个对手
public static int[] victory = { 0, 0 };//每个对手胜利的次数
public static string[] huaQuan = new string[2];//每个对手每次的出拳
public static void StartInterface()//游戏开始界面设置
{
Console.WriteLine("****************************欢 迎 进 入 游 戏 世 界
*****************************");
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
Console.WriteLine(" *********************** ");
Console.WriteLine(" **猜拳 开始** ");
Console.WriteLine(" *********************** ");
Game.SelectMode();
}
public static void SelectMode()//对战模式选择
{
int choose;
do
{
Console.WriteLine("请选择对战模式:");
Console.WriteLine("1.{0} 2.{1}", Mode.人机对战, Mode.玩家对战);
choose = int.Parse(Console.ReadLine());
switch (choose)
{
case 1:
Console.WriteLine(Mode.人机对战.ToString());
Game.Start(Mode.人机对战.ToString());
break;
case 2:
Console.WriteLine(Mode.玩家对战.ToString());
Game.Start(Mode.玩家对战.ToString());
break;
default:
Console.WriteLine("输入错误,请重新选择");
continue;
}
} while (choose > 2);
}
public static void Start(string mode)//调用角色选择
{
if (mode == Mode.人机对战.ToString())
{
Player.SelectRoles();
}
else
{
Player.SelectRoles(mode);
}
}
public static void Compare()//人机对战划拳结果比较
{
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("高桥南胜利!请再接再厉!!!");
}
else 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()))
{
Console.WriteLine("打成平手!!不服再战!!!");
}
else
{
victory[0]++;
Console.WriteLine(player[0] + "胜利!恭喜恭喜!!!");
}
}
public static void Compare(string huaQuan1, string huaQua2)//玩家对战划拳结果比较
{
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] + "胜利!恭喜恭喜!!!");
}
else 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()))
{
Console.WriteLine("打成平手!!不服再战!!!");
}
else
{
victory[0]++;
Console.WriteLine(player[0] + "胜利!恭喜恭喜!!!");
}
}
public static void Last()//最后总结
{
Console.WriteLine("
************比赛结果****************");
Console.WriteLine("
"+player[0] + "VS" + player[1]);
Console.WriteLine("对战次数:" + AgainstTheNumber);
if (victory[0] > victory[1])
{
Console.WriteLine("{0}胜利,胜利次数是:{1}", player[0], victory[0]);
}
else if (victory[0] < victory[1])
{
Console.WriteLine("{0}胜利,胜利次数是:{1}", player[1], victory[1]);
}
else
{
Console.WriteLine("{0}与{1}打成平手,相约下次再战!!", player[0], player[1]);
}
Console.WriteLine("
———————————————————————————————————————");
Console.WriteLine("———————————————————————————————————————"); Console.WriteLine("****************************游 戏 结 束 ! ! *****************************"); Console.ReadLine();
}
}
class Player
{
public string[] role = new string[3];
public Player()//对角色赋值
{
role[0] = Role.前田敦子.ToString();
role[1] = Role.板野友美.ToString();
role[2] = Role.渡边麻友.ToString();
}
public static void SelectRoles()//人机对战模式选择角色
{
Player players = new Player();
int choose;
do
{
Console.WriteLine("请玩家选择角色(1.{0} 2.{1} 3.{2})", players.role[0], players.role[1], players.role[2]);
choose = int.Parse(Console.ReadLine());
switch (choose)
{
case 1:
Game.player[0] = players.role[0];
Console.WriteLine("
您选择的角色是:" + Game.player[0]);
break;
case 2:
Game.player[0] = players.role[1];
Console.WriteLine("
您选择的角色是:" + Game.player[0]);
break;
case 3:
Game.player[0] = players.role[2];
Console.WriteLine("
您选择的角色是:" + Game.player[0]);
break;
default:
Console.WriteLine("没有这个选项,请重新输入!!");
break;
}
} while (choose > 3);
Game.player[1] = "高桥南";
HuaQuan();
}
public static void SelectRoles(string mode)//玩家对战角色选择
{
《猜拳游戏》出自:百味书屋
链接地址:http://www.850500.com/news/70809.html
转载请保留,谢谢! |
|