资源简介

用C#控制台程序做的一个德州扑克小游戏 比较简单 但是是有画面的 主要精力是画面的构建 和 规则的算法 只做自己学习用 上传的是源代码 之前那版有些问题已经修改

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
//模仿德州扑克的自娱自乐的小游戏 全部用控制台打印  作者:周飚  2020年3月23日
namespace dezhouPuke
{
    class Program
    {
        static int MoneyInAll;
        static private GameSence gameSence;
        static bool Droped = false;
        static void Main(string[] args)
        {

            Console.WindowWidth = 50;
            Console.WindowHeight = 18;
            Console.OutputEncoding = Encoding.UTF8;//很重要 指定字符输出格式 不然花色输出不出来
            gameSence = new GameSence();
            MoneyInAll  = 10000;
            gameSence.Show();
            while (true)
            {
            gameStart();
            gameSence.Money = gameSence.Money - gameSence.InMoney;
            gameSence.Show();
            AskDropOrNot(() =>
            {
                AddPokerToList(getPokerFromPool(gameSence.PokerPool) gameSence.OnTablePokers false);
                AddPokerToList(getPokerFromPool(gameSence.PokerPool) gameSence.OnTablePokers false);
                AddPokerToList(getPokerFromPool(gameSence.PokerPool) gameSence.OnTablePokers false);
            });

            AskDropOrNot(() =>
            {
                AddPokerToList(getPokerFromPool(gameSence.PokerPool) gameSence.OnTablePokers false);
            });

            AskDropOrNot(() =>
            {
                AddPokerToList(getPokerFromPool(gameSence.PokerPool) gameSence.OnTablePokers false);
            });

                if (!Droped)
                {
                    PokerResultCalc EnemyPokerResultCalc = new PokerResultCalc(gameSence.OnTablePokers gameSence.EnemyPokers);
                    PokerResultCalc MyPokerResultCalc = new PokerResultCalc(gameSence.OnTablePokers gameSence.MyPokers);
                    gameSence.EnemyPokers[0].covered = false;
                    gameSence.EnemyPokers[1].covered = false;
                    gameSence.Show();

                    if (EnemyPokerResultCalc.calcreuslt() == MyPokerResultCalc.calcreuslt())
                    {
                        
                        gameSence.Money = gameSence.Money + gameSence.MoneyPool;
                        gameSence.Show();
                        Console.WriteLine(“平局“);
                    }

                    if (EnemyPokerResultCalc.calcreuslt() > MyPokerResultCalc.calcreuslt())
                    {
                        Console.WriteLine(“你输了“);

                    }

                    if (EnemyPokerResultCalc.calcreuslt() < MyPokerResultCalc.calcreuslt())
                    {
                        
                        gameSence.Money = gameSence.Money + gameSence.MoneyPool * 2;
                        gameSence.Show();
                        Console.WriteLine(“你赢了“);
                    }
                }
                MoneyInAll = gameSence.Money;
                if (Money

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     32256  2020-03-23 21:18  dezhouPuke\.vs\dezhouPuke\v15\.suo

     文件          0  2020-03-22 08:07  dezhouPuke\.vs\dezhouPuke\v15\Server\sqlite3\db.lock

     文件     462848  2020-03-23 17:01  dezhouPuke\.vs\dezhouPuke\v15\Server\sqlite3\storage.ide

     文件      32768  2020-03-23 21:07  dezhouPuke\.vs\dezhouPuke\v15\Server\sqlite3\storage.ide-shm

     文件    4132392  2020-03-23 21:17  dezhouPuke\.vs\dezhouPuke\v15\Server\sqlite3\storage.ide-wal

     文件        189  2020-03-22 08:07  dezhouPuke\dezhouPuke\App.config

     文件      17920  2020-03-23 21:18  dezhouPuke\dezhouPuke\bin\Debug\dezhouPuke.exe

     文件        189  2020-03-22 08:07  dezhouPuke\dezhouPuke\bin\Debug\dezhouPuke.exe.config

     文件      38400  2020-03-23 21:18  dezhouPuke\dezhouPuke\bin\Debug\dezhouPuke.pdb

     文件       2370  2020-03-22 08:07  dezhouPuke\dezhouPuke\dezhouPuke.csproj

     文件       6773  2020-03-22 08:07  dezhouPuke\dezhouPuke\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件         42  2020-03-23 21:07  dezhouPuke\dezhouPuke\obj\Debug\dezhouPuke.csproj.CoreCompileInputs.cache

     文件       1692  2020-03-23 21:08  dezhouPuke\dezhouPuke\obj\Debug\dezhouPuke.csproj.FileListAbsolute.txt

     文件       8077  2020-03-22 08:07  dezhouPuke\dezhouPuke\obj\Debug\dezhouPuke.csprojAssemblyReference.cache

     文件      17920  2020-03-23 21:18  dezhouPuke\dezhouPuke\obj\Debug\dezhouPuke.exe

     文件      38400  2020-03-23 21:18  dezhouPuke\dezhouPuke\obj\Debug\dezhouPuke.pdb

     文件          0  2020-03-22 08:07  dezhouPuke\dezhouPuke\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2020-03-22 08:07  dezhouPuke\dezhouPuke\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2020-03-22 08:07  dezhouPuke\dezhouPuke\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件      26806  2020-03-23 21:18  dezhouPuke\dezhouPuke\Program.cs

     文件       1318  2020-03-22 08:07  dezhouPuke\dezhouPuke\Properties\AssemblyInfo.cs

     文件       1128  2020-03-22 08:07  dezhouPuke\dezhouPuke.sln

     目录          0  2020-03-22 22:54  dezhouPuke\.vs\dezhouPuke\v15\Server\sqlite3

     目录          0  2020-03-22 22:54  dezhouPuke\.vs\dezhouPuke\v15\Server

     目录          0  2020-03-22 08:07  dezhouPuke\dezhouPuke\obj\Debug\TempPE

     目录          0  2020-03-22 22:54  dezhouPuke\.vs\dezhouPuke\v15

     目录          0  2020-03-22 22:54  dezhouPuke\dezhouPuke\bin\Debug

     目录          0  2020-03-22 22:54  dezhouPuke\dezhouPuke\obj\Debug

     目录          0  2020-03-22 22:54  dezhouPuke\.vs\dezhouPuke

     目录          0  2020-03-22 22:54  dezhouPuke\dezhouPuke\bin

............此处省略8个文件信息

评论

共有 条评论