提交源码

编译环境 VS2017
This commit is contained in:
筱傑 2018-09-24 12:54:34 +08:00 committed by GitHub
parent a980868e77
commit a6666bcd52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 1059 additions and 0 deletions

2
蜘蛛纸牌/Card.cpp Normal file
View File

@ -0,0 +1,2 @@
#include "Card.h"

37
蜘蛛纸牌/Card.h Normal file
View File

@ -0,0 +1,37 @@
#pragma once
#include "CardType.h"
class Card
{
private:
CardValue _Value;
CardType _Type;
public:
Card() {}
Card(CardValue value, CardType type)
:_Value(value), _Type(type) {}
~Card() {}
CardValue GetValue() const
{
return _Value;
}
CardType GetType() const
{
return _Type;
}
bool operator<(const Card & card) const
{
return _Value < card._Value;
}
bool operator<(const CardValue & value) const
{
return _Value < value;
}
};

39
蜘蛛纸牌/CardType.h Normal file
View File

@ -0,0 +1,39 @@
#pragma once
// 卡牌类型
enum CardType {
// 黑桃
Spade,
// 红桃
Heart,
// 梅花
Club,
// 方块
Diamond
};
const int CardTypeNum = 4;
// 卡牌的值
enum CardValue {
_A,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
_10,
_J,
_Q,
_K,
};
const int CardValueNum = 13;

View File

@ -0,0 +1,36 @@
#include "CardsSlots.h"
CardsSlots::CardsSlots()
{
}
CardsSlots::~CardsSlots()
{
}
void CardsSlots::Push(Card card)
{
_Cards.push_back(card);
}
void CardsSlots::MoveCardsTo(CardsSlots & targetSlots, int first)
{
std::vector<Card> & targetCards = targetSlots.GetCards();
targetCards.insert(targetCards.end(), _Cards.begin() + first, _Cards.end());
_Cards.erase(_Cards.begin() + first, _Cards.end());
UpdateHideLevel();
}
void CardsSlots::Pop(int num)
{
_Cards.erase(_Cards.end() - num, _Cards.end());
UpdateHideLevel();
}
void CardsSlots::UpdateHideLevel()
{
if (HideLevel > 0 && HideLevel == _Cards.size())
HideLevel--;
}

31
蜘蛛纸牌/CardsSlots.h Normal file
View File

@ -0,0 +1,31 @@
#pragma once
#include <vector>
#include "Card.h"
class CardsSlots
{
private:
std::vector<Card> _Cards;
int HideLevel;
public:
CardsSlots();
~CardsSlots();
int GetHideLevel() const { return HideLevel; }
void SetHideLevel(int level) { HideLevel = level; }
size_t Count() const { return _Cards.size(); }
void Clear() { _Cards.clear(); }
void Push(Card card);
void MoveCardsTo(CardsSlots &targetSlots, int first);
void Pop(int num);
std::vector<Card> & GetCards() { return _Cards; }
private:
void UpdateHideLevel();
};

BIN
蜘蛛纸牌/Debug/Card.obj Normal file

Binary file not shown.

Binary file not shown.

BIN
蜘蛛纸牌/Debug/Game.obj Normal file

Binary file not shown.

BIN
蜘蛛纸牌/Debug/View.obj Normal file

Binary file not shown.

BIN
蜘蛛纸牌/Debug/main.obj Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,7 @@
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\vc141.pdb
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\vc141.idb
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\card.obj
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\cardsslots.obj
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\蜘蛛纸牌.tlog\cl.command.1.tlog
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\蜘蛛纸牌.tlog\cl.read.1.tlog
f:\c++\vs\蜘蛛纸牌\蜘蛛纸牌\debug\蜘蛛纸牌.tlog\cl.write.1.tlog

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
 main.cpp
蜘蛛纸牌.vcxproj -> F:\C++\VS\蜘蛛纸牌\蜘蛛纸牌\Debug\蜘蛛纸牌.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.16299.0
Debug|Win32|F:\C++\VS\蜘蛛纸牌\蜘蛛纸牌\|

329
蜘蛛纸牌/Game.cpp Normal file
View File

@ -0,0 +1,329 @@
#include "Game.h"
#include <random>
Game::Game(Difficulty difficulty) :_pView(new View(*this))
{
SetDifficulty(difficulty);
}
Game::~Game()
{
}
void Game::Show()
{
_pView->ShowGame();
}
void Game::SetDifficulty(Difficulty newDifficulty)
{
_Difficulty = newDifficulty;
switch (newDifficulty)
{
case easy:
for (int i = 0; i < GroupsNum; ++i)
{
for (int j = 0; j < CardValueNum; ++j)
{
_Cards[i * CardValueNum + j] = Card((CardValue)j, CardType::Spade);
}
}
break;
case normal:
for (int i = 0; i < GroupsNum; ++i)
{
for (int j = 0; j < CardValueNum; ++j)
{
_Cards[i * CardValueNum + j] = Card((CardValue)j, j % 2 ? CardType::Heart : CardType::Spade);
}
}
break;
case hard:
for (int i = 0; i < GroupsNum; ++i)
{
for (int j = 0, k = 0; j < CardValueNum; ++j, k = (k + 1) % 4)
{
_Cards[i * CardValueNum + j] = Card((CardValue)j, (CardType)k);
}
}
break;
default:
break;
}
}
void Game::Shuffle()
{
static std::random_device rd;
std::default_random_engine e1(rd());
std::uniform_int_distribution<int> uniform_dist(0, _Cards.size() - 1);
for (int i = 0; i < _Cards.size(); ++i)
{
std::swap(_Cards[i], _Cards[uniform_dist(e1)]);
}
}
void Game::InitScenes()
{
ReservedCount = ReservedQuantity;
SuccessCount = 0;
IsVictory = false;
for (int i = 0; i < Scenes.size(); ++i)
Scenes[i].Clear();
for (int i = ReservedQuantity * Scenes.size(), j = 0; i < _Cards.size(); ++i, j = (j+1) % Scenes.size())
Scenes[j].Push(_Cards[i]);
for (int i = 0; i < Scenes.size(); ++i)
Scenes[i].SetHideLevel(Scenes[i].Count() - 1);
PSelected.SetValue(-1, -1);
PCurrent.SetValue(0, Scenes[0].Count() - 1);
}
void Game::StartNewGame()
{
Shuffle();
InitScenes();
}
void Game::Deal()
{
if (ReservedCount < 1)
return;
// 将之前选中的取消掉
PSelected.SetValue(-1, -1);
// 为每一个槽发一张牌
for (int i = 0; i < Scenes.size(); ++i)
{
Scenes[i].Push(_Cards[(ReservedCount-1) * Scenes.size() + i]);
}
// 次数减一
ReservedCount--;
}
void Game::CurMove(Dir dir)
{
int width = Scenes.size();
int height = Scenes[PCurrent.x].Count();
switch (dir)
{
case left:
if (PCurrent.x == 0)
PCurrent.x = width -1;
else
PCurrent.x--;
break;
case up:
if (height == 0)
PCurrent.y = 0;
else if (PCurrent.y == 0)
PCurrent.y = height - 1;
else
PCurrent.y--;
break;
case right:
if (PCurrent.x == width - 1)
PCurrent.x = 0;
else
PCurrent.x++;
break;
case down:
if (height == 0)
PCurrent.y = 0;
else if (PCurrent.y == height - 1)
PCurrent.y = 0;
else
PCurrent.y++;
break;
default:
break;
}
// 如果现在这一列没任何牌 指向底
if (Scenes[PCurrent.x].Count() == 0)
PCurrent.y = 0;
// 否则如果光标高度高于当前高度
// 或者之前的高度是0
// 或者之前在上一列的顶部时
// 将光标指向当前列的顶部
else if (PCurrent.y >= Scenes[PCurrent.x].Count()
|| height == 0
|| PCurrent.y == height - 1)
PCurrent.y = Scenes[PCurrent.x].Count() - 1;
}
bool Game::Select()
{
if (PCurrent.x < 0 || PCurrent.x >= Scenes.size())
return false;
if (Scenes[PCurrent.x].Count() == 0 && PCurrent.y != 0)
return false;
// 如果选中之前选的,则取消选中
if (PSelected == PCurrent)
{
PSelected.SetValue(-1, -1);
return true;
}
// 如果之前未选中任何东西
if (PSelected.x == -1)
{
// 判断当前选的这个可不可以选
if (CheckIsOptional(PCurrent))
{
// 如果可以选就选中这个位置返回true
PSelected = PCurrent;
return true;
}
else
{
return false;
}
}
// 否则说明之前选中了东西,尝试移动
else
{
// 如果新选的和之前选的是同一列 或者 选的是不是中间的牌
if (PCurrent.x == PSelected.x || PCurrent.y != Scenes[PCurrent.x].Count() - 1)
{
// 如果这一列啥都没有
if (Scenes[PCurrent.x].Count() == 0)
{
// 直接移动过去
MoveCards(PSelected, PCurrent.x);
PSelected.SetValue(-1, -1);
return true;
}
if (CheckIsOptional(PCurrent))
{
PSelected = PCurrent;
return true;
}
else
{
return false;
}
}
// 否则说明选的是其它列的最后一张
else
{
// 如果可以移动过去
if (CheckIsOrderly(
Scenes[PCurrent.x].GetCards().at(PCurrent.y),
Scenes[PSelected.x].GetCards().at(PSelected.y),
_Difficulty))
{
// 直接移动过去
MoveCards(PSelected, PCurrent.x);
PSelected.SetValue(-1, -1);
return true;
}
// 否则选中这一张牌
else
{
PSelected = PCurrent;
return true;
}
}
}
}
void Game::MoveCards(Point point, int SlotsIndex)
{
// 将指定位置的牌移动到对应的槽中
Scenes[point.x].MoveCardsTo(Scenes[SlotsIndex], point.y);
// 检测是否完成
if (CheckIsSuccess(SlotsIndex))
{
// 如果完成一组,则弹出这一组排
Scenes[SlotsIndex].Pop(CardValueNum);
// 然后将完成计数自增
SuccessCount++;
if (SuccessCount == GroupsNum)
IsVictory = true;
}
}
bool Game::CheckIsOptional(Point point)
{
// 如果这一列啥都没有
if (Scenes[point.x].Count() == 0)
return false;
if (point.y < Scenes[point.x].GetHideLevel())
return false;
if (point.y == Scenes[point.x].Count() - 1)
return true;
for (int i = point.y; i < Scenes[point.x].Count() - 1; ++i)
{
// 检查是否有序,只要有一个是错误的,那直接无法选中
if (!CheckIsOrderly(Scenes[point.x].GetCards().at(i), Scenes[point.x].GetCards().at(i + 1), _Difficulty))
{
return false;
}
}
return true;
}
bool Game::CheckIsOrderly(Card cur, Card next, Difficulty difficulty)
{
if (cur.GetValue() != next.GetValue() + 1)
return false;
// 根据难度检查花色
switch (difficulty)
{
// 简单难度不看花色
case easy:
return true;
// 普通难度要看是否黑红相间
case normal:
return cur.GetType() == CardType::Spade && next.GetType() == CardType::Heart
|| cur.GetType() == CardType::Heart && next.GetType() == CardType::Spade;
// 困难难度要看是否按照黑桃、红桃、梅花、方块的顺序来
case hard:
return cur.GetType() == CardType::Spade && next.GetType() == CardType::Heart
|| cur.GetType() == CardType::Heart && next.GetType() == CardType::Club
|| cur.GetType() == CardType::Club && next.GetType() == CardType::Diamond
|| cur.GetType() == CardType::Diamond && next.GetType() == CardType::Spade;
default:
break;
}
return false;
}
// 检查这一个槽是否完成
bool Game::CheckIsSuccess(int SlotsIndex)
{
// 先判断这个槽的数量足不足够完成一副牌
if (Scenes[SlotsIndex].Count() < CardValueNum)
return false;
// 如果显示出来的数量不足完成一副牌,直接返回
if (Scenes[SlotsIndex].Count() - Scenes[SlotsIndex].GetHideLevel() < CardValueNum)
return false;
std::vector<Card> Cards = Scenes[SlotsIndex].GetCards();
// 然后判断最下面那张牌是不是A如果不是直接返回
if (Cards.back().GetValue() != CardValue::_A)
return false;
// 然后检查倒数一副牌数量的位置开始是否有序,直接返回检查结果
return CheckIsOptional(Point(SlotsIndex, Cards.size() - CardValueNum));
}

122
蜘蛛纸牌/Game.h Normal file
View File

@ -0,0 +1,122 @@
#pragma once
#include <vector>
#include <array>
#include "Card.h"
#include "View.h"
#include "CardsSlots.h"
// 难度
enum Difficulty
{
// 简单
easy,
// 普通
normal,
// 困难
hard,
};
// 牌槽数量
const int SlotsNum = 10;
// 卡组数量
const int GroupsNum = 8;
// 预留数 预留的牌组数量 = 预留数 * 槽数量 = 5 * 10 = 50 可以发五次
const int ReservedQuantity = 5;
struct Point {
int x, y;
Point()
:x(0), y(0)
{}
Point(int a, int b)
:x(a), y(b)
{}
void SetValue(int a, int b)
{
x = a, y = b;
}
bool operator == (const Point p) const
{
return x == p.x && y == p.y;
}
};
enum Dir {
left,
up,
right,
down
};
class View;
class Game
{
private:
// 本场游戏的所有牌
std::array<Card, GroupsNum * CardValueNum> _Cards;
// 游戏难度
Difficulty _Difficulty;
View *_pView;
std::array<CardsSlots, SlotsNum> Scenes;
// 预留发牌的次数
int ReservedCount;
// 成功完成组合的计数器
int SuccessCount;
Point PSelected;
Point PCurrent;
bool IsVictory;
public:
friend class View;
Game(Difficulty difficulty = Difficulty::easy);
~Game();
void Show();
void SetDifficulty(Difficulty newDifficulty);
Difficulty GetDifficulty() const { return _Difficulty; }
bool GetIsVictory() const { return IsVictory; }
// 洗牌
void Shuffle();
// 初始化场景
void InitScenes();
// 开始一场新游戏
void StartNewGame();
// 发牌(预留发牌次数足够的情况下才会发成功)
void Deal();
public:
// 光标移动
void CurMove(Dir dir);
// 选择当前光标指向的牌 返回是否选择成功
bool Select();
private:
void MoveCards(Point point, int SlotsIndex);
bool CheckIsOptional(Point point);
bool CheckIsOrderly(Card cur, Card next, Difficulty difficulty);
bool CheckIsSuccess(int SlotsIndex);
};

85
蜘蛛纸牌/View.cpp Normal file
View File

@ -0,0 +1,85 @@
#include "View.h"
#include <iostream>
const char *CardTypeView[] = {
"黑桃",
"红心",
"梅花",
"方块",
};
const char *CardValueView[] = {
" A"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9","10"," J"," Q"," K"
};
View::~View()
{
}
void View::ShowCard(bool isNull)
{
std::cout << (isNull ? " " : "XXXXXX");
}
void View::ShowCard(Card card)
{
std::cout << CardTypeView[card.GetType()] << CardValueView[card.GetValue()];
}
void View::ShowGame()
{
bool flag = true;
char lc = '[', rc = ']';
for (int level = 0; flag; ++level)
{
flag = false;
for (int i = 0; i < _Game.Scenes.size(); ++i)
{
if (_Game.PSelected.y == level && _Game.PSelected.x == i)
lc = rc = '*';
else if (_Game.PCurrent.y == level && _Game.PCurrent.x == i)
lc = '>', rc = '<';
else
lc = '[', rc = ']';
// 如果是还没翻开的槽
if (level < _Game.Scenes[i].GetHideLevel())
{
std::cout << lc;
ShowCard(false);
std::cout << rc;
flag = true;
}
// 否则如果是有牌的
else if (level < _Game.Scenes[i].Count())
{
std::cout << lc;
ShowCard(_Game.Scenes[i].GetCards()[level]);
std::cout << rc;
flag = true;
}
// 否则如果是空的槽
else if (level == 0 && _Game.Scenes[i].Count() == 0)
{
// 如果光标正在这个槽上,出现光标
if (_Game.PCurrent.y == level && _Game.PCurrent.x == i)
lc = '>', rc = '<';
else
lc = ' ', rc = ' ';
std::cout << lc;
ShowCard(true);
std::cout << rc;
}
// 其它的全部输出空
else
{
std::cout << ' ';
ShowCard(true);
std::cout << ' ';
}
}
std::cout << std::endl;
}
std::cout << "\n\n\n当前已经完成:" << _Game.SuccessCount << "\t剩余发牌次数:" << _Game.ReservedCount << "" << std::endl;
}

25
蜘蛛纸牌/View.h Normal file
View File

@ -0,0 +1,25 @@
#pragma once
#include "Card.h"
#include "CardType.h"
#include "Game.h"
extern const char *CardTypeView[];
extern const char *CardValueView[];
class Game;
class View
{
private:
Game &_Game;
public:
View(Game &game) :_Game(game) {}
~View();
void ShowCard(bool isNull);
void ShowCard(Card card);
void ShowGame();
};

90
蜘蛛纸牌/main.cpp Normal file
View File

@ -0,0 +1,90 @@
#include <iostream>
#include <conio.h>
using namespace std;
#include "Game.h"
void showGame();
bool input();
Game game;
int main()
{
game.StartNewGame();
while (true)
{
showGame();
while(!input())
;
if (game.GetIsVictory())
{
system("cls");
std::cout << "游戏胜利!按任意键开始新游戏" << std::endl;
game.StartNewGame();
}
}
getchar();
return 0;
}
void showGame()
{
system("cls");
game.Show();
std::cout << "\n\n\n"
<< "[w] [s] [a] [d] 移动光标 [e] 发牌 [r] 开始新游戏 [q] 退出游戏" << std::endl
<< "[1] 简单难度 [2] 普通难度 [3] 困难难度" << std::endl;
}
bool input()
{
switch (_getch())
{
case 'w':
case 'W':
game.CurMove(Dir::up);
break;
case 's':
case 'S':
game.CurMove(Dir::down);
break;
case 'a':
case 'A':
game.CurMove(Dir::left);
break;
case 'd':
case 'D':
game.CurMove(Dir::right);
break;
case ' ':
game.Select();
break;
case 'e':
case 'E':
game.Deal();
break;
case 'r':
case 'R':
game.StartNewGame();
break;
case '1':
game.SetDifficulty(Difficulty::easy);
game.StartNewGame();
break;
case '2':
game.SetDifficulty(Difficulty::normal);
game.StartNewGame();
break;
case '3':
game.SetDifficulty(Difficulty::hard);
game.StartNewGame();
break;
case 'q':
exit(0);
default:
return false;
break;
}
return true;
}

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "蜘蛛纸牌", "蜘蛛纸牌.vcxproj", "{2358BF32-823A-4544-A768-0F7CB1421917}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2358BF32-823A-4544-A768-0F7CB1421917}.Debug|x64.ActiveCfg = Debug|x64
{2358BF32-823A-4544-A768-0F7CB1421917}.Debug|x64.Build.0 = Debug|x64
{2358BF32-823A-4544-A768-0F7CB1421917}.Debug|x86.ActiveCfg = Debug|Win32
{2358BF32-823A-4544-A768-0F7CB1421917}.Debug|x86.Build.0 = Debug|Win32
{2358BF32-823A-4544-A768-0F7CB1421917}.Release|x64.ActiveCfg = Release|x64
{2358BF32-823A-4544-A768-0F7CB1421917}.Release|x64.Build.0 = Release|x64
{2358BF32-823A-4544-A768-0F7CB1421917}.Release|x86.ActiveCfg = Release|Win32
{2358BF32-823A-4544-A768-0F7CB1421917}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {839C1040-BA87-4924-9F44-029555EEB49C}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{2358BF32-823A-4544-A768-0F7CB1421917}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>蜘蛛纸牌</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Card.cpp" />
<ClCompile Include="CardsSlots.cpp" />
<ClCompile Include="Game.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="View.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Card.h" />
<ClInclude Include="CardsSlots.h" />
<ClInclude Include="CardType.h" />
<ClInclude Include="Game.h" />
<ClInclude Include="View.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Card.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="View.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Game.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CardsSlots.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Card.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CardType.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="View.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Game.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CardsSlots.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>