-
扑克游戏
用Card类数组模拟扑克牌,定义3个数组分别表示玩家手中的牌,电脑手中的牌和底牌,用srand((unsigned)time(NULL))产生随机数字,将底牌数组中随机的一项从底牌中移动到其他的数组中,模拟从洗好底牌中抓牌。表示出牌。
单人练习模式中,首先记下一个
1到13之间的随机数字,然后玩家抓牌,当手中的牌的点数恰与记下的随机数字相等,或用手中有的任意两张牌,通过加减乘除四则运算可以凑出该随机数字相等
的点数,则停止抓牌并将这一张或两张出出去,随即记下一个新的随机数字,开始下一轮,直道手中的全部牌出完,游戏结束。
人机对抗模式中,首先玩家和计算机各分的5张牌,然后比较玩家和计算机手中最小的牌,谁的小谁就打出这张最小的牌,另一方认为自己的牌凑不出这张牌的点数
则开始抓牌,直道手中的牌的点数恰与第一个人出的牌相等,或者用手中有的任意两张牌,通过加减乘除四则运算可以凑出第一个人出的牌相等的点数,则停止抓牌
并将这一张或两张出出去,然后要求对方以同样的规则,开始下一轮,直道某一方手中的全部牌出完,游戏结束。
- 2022-07-22 08:30:26下载
- 积分:1
-
隐马尔可夫模型简介
隐马尔可夫模型简介-Hidden Markov Model Introduction
- 2023-07-31 08:00:07下载
- 积分:1
-
求串的长度算法的实现
求串的长度算法的实现-Series for the length of the algorithm to achieve
- 2022-08-12 09:11:08下载
- 积分:1
-
Handwritten
非常好的学习资料,请参考,以后多多请教高手,我这方面还不是很懂-Handwritten
- 2023-02-18 04:00:04下载
- 积分:1
-
图像处理中的基本运算
数字图像获取、处理和实践——很多图像处理有用的源代码,图像增强(均值滤波3*3,5*5,中值滤波),边缘检测(sobel算子,拉普拉斯算子,reborts算子),图像分割(固定阈值分割,最大类间方差阈值分割)等
- 2022-05-19 03:02:12下载
- 积分:1
-
DBSCAN算法
% Function: [class,type]=dbscan(x,k,Eps)
% -------------------------------------------------------------------------
% Aim:
% Clustering the data with Density-Based Scan Algorithm with Noise (DBSCAN)
% -------------------------------------------------------------------------
% Input:
% x - data set (m,n); m-objects, n-variables
% k - number of objects in a neighborhood of an object
% (minimal number of objects considered as a cluster)
% Eps - neighborhood radius, if not known avoid this parameter or put []
% -------------------------------------------------------------------------
% Output:
% class - vector specifying assignment of the i-th object to certain
% cluster (m,1)
% type - vector specifying type of the i-th object
% (core: 1, border: 0, outlier: -1)
- 2022-04-08 08:12:27下载
- 积分:1
-
线性规划算法的实现
线性规划算法的实现-linear programming algorithm implementation
- 2022-07-01 08:54:43下载
- 积分:1
-
anti aliasing c+ code
Line drawing with Anti-aliasingWuLines.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally.WuLines.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-01-22 10:46:50下载
- 积分:1
-
拉格朗日插值的MATLAB
MatLab的拉格朗日插值法-MatLab Lagrange interpolation
- 2022-03-03 04:31:00下载
- 积分:1
-
using a tree branch to paint the procedures written in vb
一个用分行来画树的程序,vb写的-using a tree branch to paint the procedures written in vb
- 2022-05-12 22:46:29下载
- 积分:1