-
扑克游戏
用Card类数组模拟扑克牌,定义3个数组分别表示玩家手中的牌,电脑手中的牌和底牌,用srand((unsigned)time(NULL))产生随机数字,将底牌数组中随机的一项从底牌中移动到其他的数组中,模拟从洗好底牌中抓牌。表示出牌。
单人练习模式中,首先记下一个
1到13之间的随机数字,然后玩家抓牌,当手中的牌的点数恰与记下的随机数字相等,或用手中有的任意两张牌,通过加减乘除四则运算可以凑出该随机数字相等
的点数,则停止抓牌并将这一张或两张出出去,随即记下一个新的随机数字,开始下一轮,直道手中的全部牌出完,游戏结束。
人机对抗模式中,首先玩家和计算机各分的5张牌,然后比较玩家和计算机手中最小的牌,谁的小谁就打出这张最小的牌,另一方认为自己的牌凑不出这张牌的点数
则开始抓牌,直道手中的牌的点数恰与第一个人出的牌相等,或者用手中有的任意两张牌,通过加减乘除四则运算可以凑出第一个人出的牌相等的点数,则停止抓牌
并将这一张或两张出出去,然后要求对方以同样的规则,开始下一轮,直道某一方手中的全部牌出完,游戏结束。
- 2022-07-22 08:30:26下载
- 积分:1
-
How to modify the MFC AppWizard Wizard to generate the appearance of the framewo...
如何修改MFC AppWizard向导生成的框架程序的外观和大小,修改图标、光标、背景的三种方法。如何增加和删除工具栏按钮,如何给应用程序增加工具栏,如何显示和隐藏工具栏。定制状态栏,在状态栏中添加时钟显示,CTime类及其用法。在状态栏中添加进度条(主窗口产生后立即产生进度条的巧妙思想,不能在OnCreate函数中直接处理,要用到自定义消息的方法)。鼠标坐标显示,在CView中获取状态栏对象的几种方式。如何为应用程序添加启动画面。
-How to modify the MFC AppWizard Wizard to generate the appearance of the framework of procedures and size, modify the icon, cursor, background three methods. How to add and remove toolbar buttons, how to increase the application toolbar, how to show and hide the toolbar. Custom status bar, add in the status bar clock display, CTime class and its usage. In the status bar to add the progress bar (the main window immediately after the progress bar the ingenious ideas, in the OnCreate function should not directly deal with, to use a custom message to the method). Mouse coordinates shows that access to the status bar in the CView object in several ways. How to add a splash screen applications.
- 2022-12-03 22:25:03下载
- 积分:1
-
C++双截面法
双截面算法的C++实现。该算法是一种无约束优化方法。它仅适用于一个变量;
- 2022-06-01 19:45:23下载
- 积分:1
-
Sorting algorithm, using merge sort of thought, and then speed up the time to so...
排序算法,运用归并排序的思想,再加快时间内解决排序问题,并显示在单文档上。-Sorting algorithm, using merge sort of thought, and then speed up the time to solve the scheduling problem, and show in a single document.
- 2022-06-22 01:06:16下载
- 积分:1
-
有脑子的贪吃蛇
一个贪吃蛇AI的js实现,基本思想:先模拟一条蛇使用去吃食,若吃到食物后(广度优先寻最短路径)蛇处于安全状态,则让真蛇去吃;若不安全,则跟着蛇尾走(广度优先寻最长路径),没走一步都需进行一次上述判断。注:只要能找到蛇头到蛇尾的路径,则蛇安全。
上述算法仍可能导致蛇进入死循环,则没有安全路径可以吃到食物,该情况发生在大部分食物已经吃完的时候,目前没找到解决办法,若有兴趣或有更好的解法,欢迎联系。
- 2022-06-01 02:44:57下载
- 积分:1
-
奇尔卡特AES算法
这是一个奇尔卡特AES算法的源代码。奇尔卡特加密组件支持128位,192位和256位AES加密两种ECB(电子菜谱)和CBC(密码块链接)模式。
- 2023-09-02 11:25:04下载
- 积分:1
-
acm model "center" algorithm
acm模式“中心”算法-acm model "center" algorithm
- 2022-01-26 01:32:59下载
- 积分:1
-
通用GPU计算已经成为越来越受欢迎,因为GPU的多…
通用GPU计算越来越受欢迎了,原因在于GPU具有多个并行计算单元,这是在GPU上进行通用计算的CPP代码-General GPU computing has become increasingly popular because GPU with multiple parallel computing units, which are common in GPU computing on the CPP code
- 2023-03-15 04:30:04下载
- 积分:1
-
adaboost检测
/****************************************************************************
NJU Magic. Copyright (c) 2007. All Rights Reserved.
--------------------------------------------------------------------
Permission to use, copy, or modify this software and its documentation
for educational and research purposes only and without fee is hereby
granted, provided that this copyright notice appear on all copies and
supporting documentation. For any other uses of this software, in
original or modified form, i
- 2022-07-13 18:29:21下载
- 积分:1
-
遗传算法求函数极大值
实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值实数编码遗传算法求函数极大值
- 2022-01-24 09:40:45下载
- 积分:1