⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dealer.cs

📁 微软系列丛书<<C#2005从入门到精通>>
💻 CS
字号:
namespace Cards
{
	class Dealer
	{
		public static void Deal(Pack pack, Game game)
		{
			game.Clear();

			Hand[] hands = 
			{ 
				game.North(), 
				game.South(), 
				game.West(),
				game.East()
			};

			int handIndex = 0;

			while (!pack.IsEmpty())
			{
				PlayingCard card = pack.Deal();
				hands[handIndex].Accept(card);

				handIndex++;
				handIndex %= 4;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -