Initial commit for gitea archival.

This commit is contained in:
melaranc 2024-01-27 21:47:41 -08:00
commit 960f64799a
167 changed files with 2183 additions and 0 deletions

100
.gitignore vendored Normal file
View File

@ -0,0 +1,100 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
#added for RIA/Silverlight projects
Generated_Code
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 KiB

BIN
Assets/Cards/Card_Back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
Assets/Cards/Club_Ace.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Eight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Five.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Four.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
Assets/Cards/Club_Jack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
Assets/Cards/Club_King.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Nine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Queen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
Assets/Cards/Club_Seven.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
Assets/Cards/Club_Six.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Ten.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Three.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Club_Two.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
Assets/Cards/Heart_Ten.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Hearts_Ace.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
Assets/Cards/Hearts_Six.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
Assets/Cards/Hearts_Two.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
Assets/Cards/Spade_Ace.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Spade_Five.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
Assets/Cards/Spade_Four.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
Assets/Cards/Spade_Jack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
Assets/Cards/Spade_King.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Spade_Nine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
Assets/Cards/Spade_Six.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Spade_Ten.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
Assets/Cards/Spade_Two.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
Assets/GameBG.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

BIN
Assets/Splash Screen.psd Normal file

Binary file not shown.

BIN
Assets/bg_splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

BIN
Assets/blackjack_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
Assets/button_hit_hover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
Assets/card_deck.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
Assets/cybersoldier.wav Normal file

Binary file not shown.

BIN
Assets/game_bgm.wav Normal file

Binary file not shown.

BIN
Assets/game_bgm2.wav Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
Assets/rock_texture.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
Assets/scoreboard_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
Assets/status_blackjack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
Assets/status_busted.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
Assets/status_stay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

24
Blackjack.sln Normal file
View File

@ -0,0 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blackjack", "Blackjack\Blackjack\Blackjack.csproj", "{8BCC83D7-5697-4282-8755-BA157E7BDB86}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlackjackContent", "Blackjack\BlackjackContent\BlackjackContent.contentproj", "{53A91419-7407-4ADC-B67C-715C2B6B120C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8BCC83D7-5697-4282-8755-BA157E7BDB86}.Debug|x86.ActiveCfg = Debug|x86
{8BCC83D7-5697-4282-8755-BA157E7BDB86}.Debug|x86.Build.0 = Debug|x86
{8BCC83D7-5697-4282-8755-BA157E7BDB86}.Release|x86.ActiveCfg = Release|x86
{8BCC83D7-5697-4282-8755-BA157E7BDB86}.Release|x86.Build.0 = Release|x86
{53A91419-7407-4ADC-B67C-715C2B6B120C}.Debug|x86.ActiveCfg = Debug|x86
{53A91419-7407-4ADC-B67C-715C2B6B120C}.Release|x86.ActiveCfg = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8BCC83D7-5697-4282-8755-BA157E7BDB86}</ProjectGuid>
<ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Blackjack</RootNamespace>
<AssemblyName>Blackjack</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<XnaPlatform>Windows</XnaPlatform>
<XnaProfile>HiDef</XnaProfile>
<XnaCrossPlatformGroupID>418aa78c-6435-4a5b-b98a-67118a1d19da</XnaCrossPlatformGroupID>
<XnaOutputType>Game</XnaOutputType>
<ApplicationIcon>Game.ico</ApplicationIcon>
<Thumbnail>GameThumbnail.png</Thumbnail>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>False</XnaCompressContent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoStdLib>true</NoStdLib>
<UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
<XnaCompressContent>true</XnaCompressContent>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.GamerServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Video, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Avatar, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="mscorlib">
<Private>False</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml">
<Private>False</Private>
</Reference>
<Reference Include="System.Core">
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq">
<Private>False</Private>
</Reference>
<Reference Include="System.Net">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="CardData.cs" />
<Compile Include="CardDeck.cs" />
<Compile Include="CardTextures.cs" />
<Compile Include="GamePlayer.cs" />
<Compile Include="GameBanker.cs" />
<Compile Include="GameButton.cs" />
<Compile Include="PlayScreen.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Program.cs" />
<Compile Include="MainGame.cs" />
<Compile Include="StartScreen.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Game.ico" />
<Content Include="GameThumbnail.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AIProjectContent\AIProjectContent.contentproj">
<Name>AIProjectContent</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Xna.Framework.4.0">
<Visible>False</Visible>
<ProductName>Microsoft XNA Framework Redistributable 4.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,231 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
public enum CardFace {
Up,
Down
}
public enum CardSuit{
Null,
Heart,
Diamond,
Spade,
Club
}
public enum CardLabel {
Null,
Ace,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King
}
class CardData {
private CardFace _CardFacePosition = CardFace.Down;
public CardFace CardFacePosition {
get { return _CardFacePosition; }
set { _CardFacePosition = value; }
}
private CardLabel _cardlabel = CardLabel.Null;
public CardLabel CardLabel {
get { return _cardlabel; }
set { _cardlabel = value; }
}
private CardSuit _mysuit = CardSuit.Null;
public CardSuit CardSuit {
get { return _mysuit; }
set { _mysuit = value; }
}
public CardData(CardLabel cardvalue, CardSuit suit, CardFace pos) {
CardLabel = cardvalue;
CardSuit = suit;
CardFacePosition = pos;
}
public Texture2D getCardTexture() {
if (CardFacePosition == CardFace.Up) {
if (CardLabel == Blackjack.CardLabel.Ace) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Ace;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Ace;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Ace;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Ace;
} else if (CardLabel == Blackjack.CardLabel.Two) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Two;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Two;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Two;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Two;
} else if (CardLabel == Blackjack.CardLabel.Three) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Three;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Three;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Three;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Three;
} else if (CardLabel == Blackjack.CardLabel.Four) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Four;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Four;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Four;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Four;
} else if (CardLabel == Blackjack.CardLabel.Five) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Five;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Five;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Five;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Five;
} else if (CardLabel == Blackjack.CardLabel.Six) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Six;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Six;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Six;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Six;
} else if (CardLabel == Blackjack.CardLabel.Seven) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Seven;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Seven;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Seven;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Seven;
} else if (CardLabel == Blackjack.CardLabel.Eight) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Eight;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Eight;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Eight;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Eight;
} else if (CardLabel == Blackjack.CardLabel.Nine) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Nine;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Nine;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Nine;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Nine;
} else if (CardLabel == Blackjack.CardLabel.Ten) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Ten;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Ten;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Ten;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Ten;
} else if (CardLabel == Blackjack.CardLabel.Jack) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Jack;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Jack;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Jack;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Jack;
} else if (CardLabel == Blackjack.CardLabel.Queen) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_Queen;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_Queen;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_Queen;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_Queen;
} else if (CardLabel == Blackjack.CardLabel.King) {
if (CardSuit == Blackjack.CardSuit.Club)
return CardTextures.Club_King;
else if (CardSuit == Blackjack.CardSuit.Diamond)
return CardTextures.Diamond_King;
else if (CardSuit == Blackjack.CardSuit.Heart)
return CardTextures.Hearts_King;
else if (CardSuit == Blackjack.CardSuit.Spade)
return CardTextures.Spade_King;
}
} else
return CardTextures.Card_Back;
return null;
}
public int getCardValue() {
switch (CardLabel) {
case Blackjack.CardLabel.Ace:
return 1;
case Blackjack.CardLabel.Two:
return 2;
case Blackjack.CardLabel.Three:
return 3;
case Blackjack.CardLabel.Four:
return 4;
case Blackjack.CardLabel.Five:
return 5;
case Blackjack.CardLabel.Six:
return 6;
case Blackjack.CardLabel.Seven:
return 7;
case Blackjack.CardLabel.Eight:
return 8;
case Blackjack.CardLabel.Nine:
return 9;
case Blackjack.CardLabel.Ten:
case Blackjack.CardLabel.Jack:
case Blackjack.CardLabel.Queen:
case Blackjack.CardLabel.King:
return 10;
}
return -1;
}
}
}

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Blackjack {
class CardDeck {
Random rd = new Random();
public List<CardData> Deck = new List<CardData>();
public CardDeck() {
restoreDeck();
shuffleDeck();
}
public void restoreDeck() {
Deck.Clear();
CardSuit[] suits = { CardSuit.Club, CardSuit.Diamond, CardSuit.Heart, CardSuit.Spade };
CardLabel[] labels = { CardLabel.Ace, CardLabel.Two,
CardLabel.Three, CardLabel.Four,
CardLabel.Five, CardLabel.Six,
CardLabel.Seven, CardLabel.Eight,
CardLabel.Nine, CardLabel.Ten,
CardLabel.Jack, CardLabel.King,
CardLabel.King };
foreach (CardSuit s in suits) {
foreach (CardLabel l in labels) {
CardData crd = new CardData(l, s, CardFace.Down);
Deck.Add(crd);
}
}
}
public void shuffleDeck() {
//shuffle 3 times.
for (int j = 0; j < 3; j++) {
for (int i = 0; i < Deck.Count; i++) {
int rpos = rd.Next(Deck.Count - 1);
CardData tmp = Deck[rpos];
Deck[rpos] = Deck[i];
Deck[i] = tmp;
}
}
}
public int getDeckCount() {
return Deck.Count;
}
public CardData getTop(CardFace pos) {
CardData crd = null;
if (Deck.Count > 0) {
Deck[0].CardFacePosition = pos;
crd = Deck[0];
Deck.RemoveAt(0);
}
return crd;
}
}
}

View File

@ -0,0 +1,138 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
class CardTextures {
public static Texture2D Hearts_Ace;
public static Texture2D Hearts_Two;
public static Texture2D Hearts_Three;
public static Texture2D Hearts_Four;
public static Texture2D Hearts_Five;
public static Texture2D Hearts_Six;
public static Texture2D Hearts_Seven;
public static Texture2D Hearts_Eight;
public static Texture2D Hearts_Nine;
public static Texture2D Hearts_Ten;
public static Texture2D Hearts_Jack;
public static Texture2D Hearts_Queen;
public static Texture2D Hearts_King;
public static Texture2D Diamond_Ace;
public static Texture2D Diamond_Two;
public static Texture2D Diamond_Three;
public static Texture2D Diamond_Four;
public static Texture2D Diamond_Five;
public static Texture2D Diamond_Six;
public static Texture2D Diamond_Seven;
public static Texture2D Diamond_Eight;
public static Texture2D Diamond_Nine;
public static Texture2D Diamond_Ten;
public static Texture2D Diamond_Jack;
public static Texture2D Diamond_Queen;
public static Texture2D Diamond_King;
public static Texture2D Spade_Ace;
public static Texture2D Spade_Two;
public static Texture2D Spade_Three;
public static Texture2D Spade_Four;
public static Texture2D Spade_Five;
public static Texture2D Spade_Six;
public static Texture2D Spade_Seven;
public static Texture2D Spade_Eight;
public static Texture2D Spade_Nine;
public static Texture2D Spade_Ten;
public static Texture2D Spade_Jack;
public static Texture2D Spade_Queen;
public static Texture2D Spade_King;
public static Texture2D Club_Ace;
public static Texture2D Club_Two;
public static Texture2D Club_Three;
public static Texture2D Club_Four;
public static Texture2D Club_Five;
public static Texture2D Club_Six;
public static Texture2D Club_Seven;
public static Texture2D Club_Eight;
public static Texture2D Club_Nine;
public static Texture2D Club_Ten;
public static Texture2D Club_Jack;
public static Texture2D Club_Queen;
public static Texture2D Club_King;
public static Texture2D Card_Back;
public static void loadCardTextures(Game game) {
Card_Back = game.Content.Load<Texture2D>("Card_Back");
Hearts_Ace = game.Content.Load<Texture2D>("Hearts_Ace");
Hearts_Two = game.Content.Load<Texture2D>("Hearts_Two");
Hearts_Three = game.Content.Load<Texture2D>("Hearts_Three");
Hearts_Four = game.Content.Load<Texture2D>("Hearts_Four");
Hearts_Five = game.Content.Load<Texture2D>("Hearts_Five");
Hearts_Six = game.Content.Load<Texture2D>("Hearts_Six");
Hearts_Seven = game.Content.Load<Texture2D>("Hearts_Seven");
Hearts_Eight = game.Content.Load<Texture2D>("Hearts_Eight");
Hearts_Nine = game.Content.Load<Texture2D>("Hearts_Nine");
Hearts_Ten = game.Content.Load<Texture2D>("Hearts_Ten");
Hearts_Jack = game.Content.Load<Texture2D>("Hearts_Jack");
Hearts_Queen = game.Content.Load<Texture2D>("Hearts_Queen");
Hearts_King = game.Content.Load<Texture2D>("Hearts_King");
Diamond_Ace = game.Content.Load<Texture2D>("Diamond_Ace");
Diamond_Two = game.Content.Load<Texture2D>("Diamond_Two");
Diamond_Three = game.Content.Load<Texture2D>("Diamond_Three");
Diamond_Four = game.Content.Load<Texture2D>("Diamond_Four");
Diamond_Five = game.Content.Load<Texture2D>("Diamond_Five");
Diamond_Six = game.Content.Load<Texture2D>("Diamond_Six");
Diamond_Seven = game.Content.Load<Texture2D>("Diamond_Seven");
Diamond_Eight = game.Content.Load<Texture2D>("Diamond_Eight");
Diamond_Nine = game.Content.Load<Texture2D>("Diamond_Nine");
Diamond_Ten = game.Content.Load<Texture2D>("Diamond_Ten");
Diamond_Jack = game.Content.Load<Texture2D>("Diamond_Jack");
Diamond_Queen = game.Content.Load<Texture2D>("Diamond_Queen");
Diamond_King = game.Content.Load<Texture2D>("Diamond_King");
Spade_Ace = game.Content.Load<Texture2D>("Spade_Ace");
Spade_Two = game.Content.Load<Texture2D>("Spade_Two");
Spade_Three = game.Content.Load<Texture2D>("Spade_Three");
Spade_Four = game.Content.Load<Texture2D>("Spade_Four");
Spade_Five = game.Content.Load<Texture2D>("Spade_Five");
Spade_Six = game.Content.Load<Texture2D>("Spade_Six");
Spade_Seven = game.Content.Load<Texture2D>("Spade_Seven");
Spade_Eight = game.Content.Load<Texture2D>("Spade_Eight");
Spade_Nine = game.Content.Load<Texture2D>("Spade_Nine");
Spade_Ten = game.Content.Load<Texture2D>("Spade_Ten");
Spade_Jack = game.Content.Load<Texture2D>("Spade_Jack");
Spade_Queen = game.Content.Load<Texture2D>("Spade_Queen");
Spade_King = game.Content.Load<Texture2D>("Spade_King");
Club_Ace = game.Content.Load<Texture2D>("Club_Ace");
Club_Two = game.Content.Load<Texture2D>("Club_Two");
Club_Three = game.Content.Load<Texture2D>("Club_Three");
Club_Four = game.Content.Load<Texture2D>("Club_Four");
Club_Five = game.Content.Load<Texture2D>("Club_Five");
Club_Six = game.Content.Load<Texture2D>("Club_Six");
Club_Seven = game.Content.Load<Texture2D>("Club_Seven");
Club_Eight = game.Content.Load<Texture2D>("Club_Eight");
Club_Nine = game.Content.Load<Texture2D>("Club_Nine");
Club_Ten = game.Content.Load<Texture2D>("Club_Ten");
Club_Jack = game.Content.Load<Texture2D>("Club_Jack");
Club_Queen = game.Content.Load<Texture2D>("Club_Queen");
Club_King = game.Content.Load<Texture2D>("Club_King");
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
class GameBanker {
List<CardData> CardHand = new List<CardData>();
MainGame game;
public GameBanker(MainGame game){
this.game = game;
}
public void Draw(SpriteBatch spriteBatch, Vector2 pos_offset) {
int cardLeft = 0;
foreach (CardData crd in CardHand) {
spriteBatch.Draw(crd.getCardTexture(), new Vector2(pos_offset.X + cardLeft, pos_offset.Y), Color.White);
cardLeft += 45;
}
}
private PlayerStatusEnum _stat = PlayerStatusEnum.Normal;
public PlayerStatusEnum PlayerStatus {
get { return _stat; }
set { _stat = value; }
}
public int GetCardTotal() {
bool containsAce = false;
int aceCount = 0;
int total = 0;
foreach (CardData crd in CardHand) {
if (crd.CardLabel == CardLabel.Ace) {
aceCount++;
containsAce = true;
}
}
if (containsAce) {
//provide highest possible value.
int sumnoace = 0;
foreach (CardData crd in CardHand) {
if (crd.CardLabel != CardLabel.Ace && crd.CardFacePosition == CardFace.Up) sumnoace += crd.getCardValue();
}
foreach (CardData crd in CardHand) {
if (crd.CardLabel == CardLabel.Ace && crd.CardFacePosition == CardFace.Up) {
if (sumnoace + 11 <= 21) sumnoace += crd.getCardValue();
else sumnoace++;
}
}
//for (int i = 0; i < aceCount; i++) {
// if (sumnoace + 11 <= 21) sumnoace += 11;
// else sumnoace++;
//}
return sumnoace;
} else {
foreach (CardData crd in CardHand) {
if(crd.CardFacePosition == CardFace.Up) total += crd.getCardValue();
}
return total;
}
}
public bool allCardsFlippedUp = false;
public void flipAllCardsUp() {
foreach (CardData crd in CardHand) {
crd.CardFacePosition = CardFace.Up;
}
allCardsFlippedUp = true;
}
public void AddCard(CardData card) {
CardHand.Add(card);
}
public void clearHand() {
CardHand.Clear();
PlayerStatus = PlayerStatusEnum.Normal;
allCardsFlippedUp = false;
}
public int getHandCount() {
return CardHand.Count;
}
}
}

View File

@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
public enum GameButtonStates {
Normal,
Pressed,
Hover,
Disabled
}
public class GameButton{
MainGame game;
//image state textures
Texture2D img_normal;
Texture2D img_hover;
Texture2D img_pressed;
Texture2D img_disabled;
Texture2D empty;
//Button properties
int Width = 0;
int Height = 0;
int Left = 0;
int Top = 0;
Rectangle buttonrect;
MouseState mlstate;
GameButtonStates prevstate = GameButtonStates.Normal;
public delegate void ButtonClickedEvent();
public event ButtonClickedEvent OnClick;
int otop = -1;
public GameButton(MainGame game, int X, int Y, int Width, int Height) {
this.game = game;
this.Width = Width;
this.Height = Height;
Left = X;
Top = Y;
empty = new Texture2D(game.GraphicsDevice, 1, 1);
empty.SetData(new Color[] { Color.White });
}
public void Update(GameTime gameTime) {
if (_visible) {
buttonrect = new Rectangle(Left, Top, Width, Height);
MouseState mstate = Mouse.GetState();
if (buttonrect.Contains(new Point(mstate.X, mstate.Y))) {
if (mstate.LeftButton == ButtonState.Released) {
MyState = GameButtonStates.Hover;
if (prevstate == GameButtonStates.Pressed) {
Top = otop;
}
} else if (mstate.LeftButton == ButtonState.Pressed) {
if (MyState != GameButtonStates.Pressed) {
otop = otop == -1 ? Top : otop;
Top = otop + 1;
if (OnClick != null) OnClick();
}
prevstate = MyState;
MyState = GameButtonStates.Pressed;
} else if (mstate.LeftButton == ButtonState.Released && mlstate.LeftButton == ButtonState.Pressed) {
MyState = GameButtonStates.Normal;
Top = otop;
}
} else {
MyState = GameButtonStates.Normal;
}
mlstate = mstate;
}
}
public void Draw(SpriteBatch spriteBatch) {
if (_visible) {
switch (MyState) {
case GameButtonStates.Normal:
case GameButtonStates.Pressed:
if (img_normal != null) spriteBatch.Draw(img_normal, buttonrect, Color.White);
break;
case GameButtonStates.Hover:
if (img_hover != null) spriteBatch.Draw(img_hover, buttonrect, Color.White);
break;
case GameButtonStates.Disabled:
if (img_disabled != null) spriteBatch.Draw(img_disabled, buttonrect, Color.White);
break;
}
}
}
private bool _visible = true;
public void setVisible(bool visible){
_visible = visible;
}
public void setNormalImage(String contentname) {
img_normal = game.Content.Load<Texture2D>(contentname);
}
public void setHoverImage(String contentname) {
img_hover = game.Content.Load<Texture2D>(contentname);
}
public void setPressedImage(String contentname) {
img_pressed = game.Content.Load<Texture2D>(contentname);
}
public void setDisabledImage(String contentname) {
img_disabled = game.Content.Load<Texture2D>(contentname);
}
private GameButtonStates _mystate = GameButtonStates.Normal;
public GameButtonStates MyState {
get { return _mystate; }
set { _mystate = value; }
}
}
}

View File

@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
public enum PlayerStatusEnum {
Normal,
Stay,
Busted,
BlackJack
}
class GamePlayer {
List<CardData> CardHand = new List<CardData>();
MainGame game;
public GamePlayer(MainGame game){
this.game = game;
}
public void Draw(SpriteBatch spriteBatch, Vector2 pos_offset) {
int cardLeft = 0;
int cardTop = 0;
foreach (CardData crd in CardHand) {
spriteBatch.Draw(crd.getCardTexture(), new Vector2(pos_offset.X + cardLeft, pos_offset.Y + cardTop), Color.White);
cardLeft += 30;
cardTop += 10;
}
}
public int getHandCount() {
return CardHand.Count;
}
private PlayerStatusEnum _stat = PlayerStatusEnum.Normal;
public PlayerStatusEnum PlayerStatus {
get { return _stat; }
set { _stat = value; }
}
public int GetCardTotal() {
bool containsAce = false;
int aceCount = 0;
int total = 0;
foreach (CardData crd in CardHand) {
if (crd.CardLabel == CardLabel.Ace) {
aceCount++;
containsAce = true;
}
}
if (containsAce) {
//provide highest possible value.
int sumnoace = 0;
foreach (CardData crd in CardHand) {
if(crd.CardLabel != CardLabel.Ace) sumnoace += crd.getCardValue();
}
for (int i = 0; i < aceCount; i++) {
if (sumnoace + 11 <= 21) sumnoace += 11;
else sumnoace++;
}
return sumnoace;
} else {
foreach (CardData crd in CardHand) {
total += crd.getCardValue();
}
return total;
}
}
public void AddCard(CardData card) {
CardHand.Add(card);
}
public void clearHand() {
CardHand.Clear();
PlayerStatus = PlayerStatusEnum.Normal;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
public enum GameState {
Nothing,
StartScreen,
GameScreen
}
public class MainGame : Microsoft.Xna.Framework.Game {
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
GameState currentScreen = GameState.Nothing;
PlayScreen playScreen;
StartScreen startScreen;
public MainGame() {
graphics = new GraphicsDeviceManager(this); //800 x 480
Window.Title = "Black Jack - Project in AI by John Espiritu";
Content.RootDirectory = "Content";
IsMouseVisible = true;
}
protected override void LoadContent() {
spriteBatch = new SpriteBatch(GraphicsDevice);
//Preload card textures
CardTextures.loadCardTextures(this);
//Load start screen.
startScreen = new StartScreen(this);
currentScreen = GameState.StartScreen;
base.LoadContent();
}
protected override void UnloadContent() {
}
protected override void Update(GameTime gameTime) {
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
this.Exit();
switch (currentScreen) {
case GameState.StartScreen:
startScreen.Update(gameTime);
break;
case GameState.GameScreen:
playScreen.Update(gameTime);
break;
}
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime) {
GraphicsDevice.Clear(new Color(27,29,32));
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied);
//Draw active screen.
switch (currentScreen) {
case GameState.StartScreen:
startScreen.Draw(spriteBatch);
break;
case GameState.GameScreen:
playScreen.Draw(spriteBatch);
break;
}
spriteBatch.End();
base.Draw(gameTime);
}
public void StartGame() {
playScreen = new PlayScreen(this);
currentScreen = GameState.GameScreen;
}
}
}

View File

@ -0,0 +1,346 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
public enum GameTurn {
Deal,
Player,
Banker,
EndRound,
StandbyEndRound
}
public class PlayScreen {
//Gamer data
GamePlayer player;
GameBanker banker;
CardDeck deck = new CardDeck();
Texture2D blackOverlay;
Rectangle blackOverlay_rect;
Texture2D bgimg;
Texture2D carddeck;
Texture2D scoreboard_bg;
SpriteFont scoreboard_fnt;
//Status textures
Texture2D status_busted;
Texture2D status_stay;
Texture2D status_bj;
MainGame game;
int overlay_alpha = 255;
double overlay_delay = 0.05f;
SoundEffectInstance bgm;
//Buttons
GameButton btnHit;
GameButton btnStay;
GameButton btnDeal;
GameTurn GameStatus = GameTurn.Deal;
//Scores
int playerwin = 0;
int bankerwin = 0;
public PlayScreen(MainGame game) {
this.game = game;
//Set background.
bgimg = game.Content.Load<Texture2D>("GameBG");
//Set carddeck image.
carddeck = game.Content.Load<Texture2D>("card_deck");
//Set overlay.
blackOverlay = new Texture2D(game.GraphicsDevice, 1, 1);
blackOverlay_rect = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
blackOverlay.SetData(new Color[] { Color.Black });
//Set status image
status_bj = game.Content.Load<Texture2D>("status_blackjack");
status_busted = game.Content.Load<Texture2D>("status_busted");
status_stay = game.Content.Load<Texture2D>("status_stay");
//Play background music.
bgm = game.Content.Load<SoundEffect>("game_bgm").CreateInstance();
bgm.Volume = 0.5f;
bgm.IsLooped = true;
bgm.Play();
//Setup scoreboard info.
scoreboard_bg = game.Content.Load<Texture2D>("scoreboard_bg");
scoreboard_fnt = game.Content.Load<SpriteFont>("ScoreboardFont");
//Setup buttons
btnHit = new GameButton(game, game.GraphicsDevice.Viewport.Width - 150, game.GraphicsDevice.Viewport.Height - 250, 130, 75);
btnHit.setNormalImage("button_hit_normal");
btnHit.setHoverImage("button_hit_hover");
btnHit.OnClick += new GameButton.ButtonClickedEvent(btnHit_OnClick);
btnStay = new GameButton(game, game.GraphicsDevice.Viewport.Width - 150, game.GraphicsDevice.Viewport.Height - 170, 130, 75);
btnStay.setNormalImage("button_stay_normal");
btnStay.setHoverImage("button_stay_hover");
btnStay.OnClick += new GameButton.ButtonClickedEvent(btnStay_OnClick);
btnDeal = new GameButton(game, game.GraphicsDevice.Viewport.Width - 150, game.GraphicsDevice.Viewport.Height - 90, 130, 75);
btnDeal.setNormalImage("button_deal_normal");
btnDeal.setHoverImage("button_deal_hover");
btnDeal.OnClick += new GameButton.ButtonClickedEvent(btnDeal_OnClick);
//Setup player object.
player = new GamePlayer(game);
banker = new GameBanker(game);
//Deal.
GameStatus = GameTurn.Deal;
}
private void endRound() {
if ((player.PlayerStatus == PlayerStatusEnum.BlackJack && banker.PlayerStatus == PlayerStatusEnum.Stay) || (player.PlayerStatus == PlayerStatusEnum.BlackJack && banker.PlayerStatus == PlayerStatusEnum.Busted))
playerwin++;
else if ((player.PlayerStatus == PlayerStatusEnum.Stay && banker.PlayerStatus == PlayerStatusEnum.BlackJack) || (player.PlayerStatus == PlayerStatusEnum.Busted && banker.PlayerStatus == PlayerStatusEnum.BlackJack))
bankerwin++;
else if (player.PlayerStatus == PlayerStatusEnum.Busted && banker.PlayerStatus == PlayerStatusEnum.Stay)
bankerwin++;
else if (player.PlayerStatus == PlayerStatusEnum.Stay && banker.PlayerStatus == PlayerStatusEnum.Busted)
playerwin++;
else if (player.PlayerStatus == PlayerStatusEnum.Stay && banker.PlayerStatus == PlayerStatusEnum.Stay) {
if (player.GetCardTotal() > banker.GetCardTotal())
playerwin++;
else if (player.GetCardTotal() < banker.GetCardTotal())
bankerwin++;
}
GameStatus = GameTurn.StandbyEndRound;
}
Random rnddes = new Random();
private void runAI() {
//Show 'em the cards baby.
if(banker.allCardsFlippedUp == false) banker.flipAllCardsUp();
//Analyze score.
int aiscore = banker.GetCardTotal();
if (aiscore == 21 && banker.getHandCount() == 2) {
banker.PlayerStatus = PlayerStatusEnum.BlackJack;
GameStatus = GameTurn.EndRound;
return;
}
if (player.PlayerStatus == PlayerStatusEnum.Busted) {
banker.PlayerStatus = PlayerStatusEnum.Stay;
GameStatus = GameTurn.EndRound;
return;
}
if (aiscore > 21) {
banker.PlayerStatus = PlayerStatusEnum.Busted;
GameStatus = GameTurn.EndRound;
return;
} else {
if (aiscore == 21) {
banker.PlayerStatus = PlayerStatusEnum.Stay;
GameStatus = GameTurn.EndRound;
return;
}
}
//tally if AI should hit, or stay.
byte hitrate = 0; // of 10
//Rate probability of hitting.
if (aiscore <= 13)
hitrate = 10;
else if (aiscore > 13 && aiscore <= 16)
hitrate = 8;
else if (aiscore > 16 && aiscore <= 18)
hitrate = 5;
else if (aiscore > 18 && aiscore <= 20)
hitrate = 2;
//fill up probability array.
bool[] decisionarray = new bool[10];
for (int i = 0; i < 10; i++) {
if (i <= hitrate - 1)
decisionarray[i] = true;
else
decisionarray[i] = false;
}
//Decide by probability
int decideindex = rnddes.Next(0, 9);
bool willHit = decisionarray[decideindex];
if (willHit) {
banker.AddCard(deck.getTop(CardFace.Up));
} else {
banker.PlayerStatus = PlayerStatusEnum.Stay;
GameStatus = GameTurn.EndRound;
return;
}
}
private void btnDeal_OnClick() {
GameStatus = GameTurn.Deal;
}
private void btnStay_OnClick() {
if (GameStatus == GameTurn.Player) {
GameStatus = GameTurn.Banker;
player.PlayerStatus = PlayerStatusEnum.Stay;
}
}
private void btnHit_OnClick() {
hitCard();
}
private void checkPlayerCards() {
if (player.GetCardTotal() == 21) {
if (player.getHandCount() == 2) {
player.PlayerStatus = PlayerStatusEnum.BlackJack;
} else {
player.PlayerStatus = PlayerStatusEnum.Stay;
}
}
if (player.GetCardTotal() > 21)
player.PlayerStatus = PlayerStatusEnum.Busted;
if (player.GetCardTotal() >= 21) {
GameStatus = GameTurn.Banker;
} else {
GameStatus = GameTurn.Player;
}
}
public void dealCards() {
if (deck.getDeckCount() < 10) {
deck.restoreDeck();
deck.shuffleDeck();
}
player.clearHand();
banker.clearHand();
player.AddCard(deck.getTop(CardFace.Up));
banker.AddCard(deck.getTop(CardFace.Down));
player.AddCard(deck.getTop(CardFace.Up));
banker.AddCard(deck.getTop(CardFace.Up));
}
public void hitCard() {
if (GameStatus == GameTurn.Player) {
player.AddCard(deck.getTop(CardFace.Up));
checkPlayerCards();
}
}
public void Update(GameTime gameTime) {
//Fade in.
if (overlay_alpha > 0) {
overlay_delay -= gameTime.ElapsedGameTime.TotalSeconds;
if (overlay_delay <= 0) {
overlay_delay = 0.05f;
overlay_alpha -= 25;
}
}
btnHit.Update(gameTime);
btnStay.Update(gameTime);
btnDeal.Update(gameTime);
//Start game.
if (GameStatus != GameTurn.StandbyEndRound)
btnDeal.setVisible(false);
else
btnDeal.setVisible(true);
//Deal.
if (GameStatus == GameTurn.Deal) {
dealCards();
GameStatus = GameTurn.Player;
}
//Check if player is black jack.
if (GameStatus == GameTurn.Player) {
checkPlayerCards();
}
if (GameStatus == GameTurn.Banker) {
runAI();
}
if (GameStatus == GameTurn.EndRound) {
endRound();
}
}
public void Draw(SpriteBatch spriteBatch) {
//Draw bg
spriteBatch.Draw(bgimg, new Vector2(0, 0), Color.White);
//Draw scoreboard bg.
spriteBatch.Draw(scoreboard_bg, new Vector2(game.GraphicsDevice.Viewport.Width - 450, game.GraphicsDevice.Viewport.Height - 250), Color.White);
//Draw scorez
spriteBatch.DrawString(scoreboard_fnt, "Your hand: " + player.GetCardTotal(), new Vector2(380, 250), Color.White);
spriteBatch.DrawString(scoreboard_fnt, "Banker's hand: " + banker.GetCardTotal(), new Vector2(380, 280), Color.White);
spriteBatch.DrawString(scoreboard_fnt, "Player Win: " + playerwin, new Vector2(380, 310), Color.White);
spriteBatch.DrawString(scoreboard_fnt, "Banker Win: " + bankerwin, new Vector2(380, 340), Color.White);
//Draw deck sprite.
spriteBatch.End();
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
spriteBatch.Draw(carddeck, new Vector2(40, 15), Color.White);
spriteBatch.End();
spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied);
//Draw player hand.
player.Draw(spriteBatch, new Vector2(35, game.GraphicsDevice.Viewport.Height - 220));
//Draw banker hand.
banker.Draw(spriteBatch, new Vector2((game.GraphicsDevice.Viewport.Width / 2) - 100, 60));
//Draw butotns.
btnHit.Draw(spriteBatch);
btnStay.Draw(spriteBatch);
btnDeal.Draw(spriteBatch);
//Draw player status
if(player.PlayerStatus == PlayerStatusEnum.Stay)
spriteBatch.Draw(status_stay, new Vector2(30, game.GraphicsDevice.Viewport.Height - 80), Color.White);
else if(player.PlayerStatus == PlayerStatusEnum.BlackJack)
spriteBatch.Draw(status_bj, new Vector2(30, game.GraphicsDevice.Viewport.Height - 80), Color.White);
else if(player.PlayerStatus == PlayerStatusEnum.Busted)
spriteBatch.Draw(status_busted, new Vector2(30, game.GraphicsDevice.Viewport.Height - 80), Color.White);
//Draw banker status.
if (banker.PlayerStatus == PlayerStatusEnum.Stay)
spriteBatch.Draw(status_stay, new Vector2((game.GraphicsDevice.Viewport.Width - status_stay.Width) / 2, 120), Color.White);
else if (banker.PlayerStatus == PlayerStatusEnum.BlackJack)
spriteBatch.Draw(status_bj, new Vector2((game.GraphicsDevice.Viewport.Width - status_stay.Width) / 2, 120), Color.White);
else if (banker.PlayerStatus == PlayerStatusEnum.Busted)
spriteBatch.Draw(status_busted, new Vector2((game.GraphicsDevice.Viewport.Width - status_stay.Width) / 2, 120), Color.White);
//Draw overlay.
spriteBatch.Draw(blackOverlay, blackOverlay_rect, new Color(255, 255, 255, overlay_alpha));
}
}
}

View File

@ -0,0 +1,20 @@
using System;
namespace Blackjack {
#if WINDOWS || XBOX
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
using (MainGame game = new MainGame())
{
game.Run();
}
}
}
#endif
}

View File

@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Blackjack")]
[assembly: AssemblyProduct("Blackjack")]
[assembly: AssemblyDescription("Project by John Espiritu")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type. Only Windows
// assemblies support COM.
[assembly: ComVisible(false)]
// On Windows, the following GUID is for the ID of the typelib if this
// project is exposed to COM. On other platforms, it unique identifies the
// title storage container when deploying this assembly to the device.
[assembly: Guid("59921487-919d-425b-8808-3983c2b29121")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace Blackjack {
/// <summary>
/// This is a game component that implements IUpdateable.
/// </summary>
public class StartScreen{
MainGame game;
KeyboardState lastKeystate;
Texture2D titlesprite;
Texture2D bgsplash;
Texture2D pressstart;
Texture2D blackoverlay;
Rectangle overlayRect;
Vector2 titlesprite_pos = new Vector2(0, 0);
Vector2 pressstart_pos = new Vector2(0, 0);
SoundEffect bgmusic;
SoundEffectInstance sfxin;
double closing_delay = 0.005f;
double pressstart_fadedelay = 0.001f;
bool pressstart_isfading = true;
int pressstart_alpha = 255;
int overlay_alpha = 0;
bool screenclosing = false;
public StartScreen(MainGame game) {
this.game = game;
titlesprite = game.Content.Load<Texture2D>("blackjack_logo");
bgsplash = game.Content.Load<Texture2D>("bg_splash");
pressstart = game.Content.Load<Texture2D>("press_enter_to_start");
bgmusic = game.Content.Load<SoundEffect>("cybersoldier");
sfxin = bgmusic.CreateInstance();
sfxin.IsLooped = true;
sfxin.Volume = 0.3f;
sfxin.Play();
titlesprite_pos = new Vector2((game.GraphicsDevice.Viewport.Width - titlesprite.Width) / 2, 100);
pressstart_pos = new Vector2((game.GraphicsDevice.Viewport.Width - pressstart.Width) / 2, 280);
blackoverlay = new Texture2D(game.GraphicsDevice, 1, 1);
overlayRect = new Rectangle(0, 0, game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height);
blackoverlay.SetData(new Color[] { Color.Black});
}
public void Unload() {
sfxin.Stop();
sfxin.Dispose();
titlesprite.Dispose();
bgsplash.Dispose();
pressstart.Dispose();
blackoverlay.Dispose();
}
private void CloseScreen() {
screenclosing = true;
}
public void Update(GameTime gameTime) {
KeyboardState keystate = Keyboard.GetState();
if (keystate.IsKeyDown(Keys.Enter) && lastKeystate.IsKeyUp(Keys.Enter)) {
//Start game.
CloseScreen();
}
lastKeystate = keystate;
if (pressstart_alpha <= 0) pressstart_isfading = false;
else if (pressstart_alpha >= 255) pressstart_isfading = true;
//Press start fade in/out animation.
pressstart_fadedelay -= gameTime.ElapsedGameTime.TotalSeconds;
if (pressstart_fadedelay <= 0) {
pressstart_fadedelay = 0.001f;
if (pressstart_isfading) {
pressstart_alpha -= 5;
} else {
pressstart_alpha += 5;
}
}
if (screenclosing) {
closing_delay -= gameTime.ElapsedGameTime.TotalSeconds;
if (closing_delay <= 0) {
closing_delay = 0.05f;
overlay_alpha += 25;
}
if (overlay_alpha > 255) {
Unload();
game.StartGame();
}
}
}
//override draw component.
public void Draw(SpriteBatch spriteBatch) {
spriteBatch.Draw(bgsplash, new Vector2(0, 0), Color.White);
spriteBatch.Draw(titlesprite, titlesprite_pos, new Color(255, 255, 255, 255));
spriteBatch.Draw(pressstart, pressstart_pos, new Color(255, 255, 255, pressstart_alpha));
spriteBatch.Draw(blackoverlay, overlayRect, new Color(255, 255, 255, overlay_alpha));
}
public void StartGame() {
}
}
}

Binary file not shown.

View File

@ -0,0 +1,431 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{53A91419-7407-4ADC-B67C-715C2B6B120C}</ProjectGuid>
<ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<XnaFrameworkVersion>v4.0</XnaFrameworkVersion>
<OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
<ContentRootDirectory>Content</ContentRootDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>AIProjectContent</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Content.Pipeline.VideoImporters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="bg_splash.png">
<Name>bg_splash</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="blackjack_logo.png">
<Name>blackjack_logo</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="press_enter_to_start.png">
<Name>press_enter_to_start</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="cybersoldier.wav">
<Name>cybersoldier</Name>
<Importer>WavImporter</Importer>
<Processor>SoundEffectProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="GameBG.png">
<Name>GameBG</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="card_deck.png">
<Name>card_deck</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="button_hit_hover.png">
<Name>button_hit_hover</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="button_hit_normal.png">
<Name>button_hit_normal</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Card_Back.png">
<Name>Card_Back</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Ace.png">
<Name>Club_Ace</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Eight.png">
<Name>Club_Eight</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Five.png">
<Name>Club_Five</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Four.png">
<Name>Club_Four</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Jack.png">
<Name>Club_Jack</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_King.png">
<Name>Club_King</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Nine.png">
<Name>Club_Nine</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Queen.png">
<Name>Club_Queen</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Seven.png">
<Name>Club_Seven</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Six.png">
<Name>Club_Six</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Ten.png">
<Name>Club_Ten</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Three.png">
<Name>Club_Three</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Club_Two.png">
<Name>Club_Two</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Ace.png">
<Name>Diamond_Ace</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Eight.png">
<Name>Diamond_Eight</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Five.png">
<Name>Diamond_Five</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Four.png">
<Name>Diamond_Four</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Jack.png">
<Name>Diamond_Jack</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_King.png">
<Name>Diamond_King</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Nine.png">
<Name>Diamond_Nine</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Queen.png">
<Name>Diamond_Queen</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Seven.png">
<Name>Diamond_Seven</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Six.png">
<Name>Diamond_Six</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Ten.png">
<Name>Diamond_Ten</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Three.png">
<Name>Diamond_Three</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Diamond_Two.png">
<Name>Diamond_Two</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Ace.png">
<Name>Hearts_Ace</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Eight.png">
<Name>Hearts_Eight</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Five.png">
<Name>Hearts_Five</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Four.png">
<Name>Hearts_Four</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Jack.png">
<Name>Hearts_Jack</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_King.png">
<Name>Hearts_King</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Nine.png">
<Name>Hearts_Nine</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Queen.png">
<Name>Hearts_Queen</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Seven.png">
<Name>Hearts_Seven</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Six.png">
<Name>Hearts_Six</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Three.png">
<Name>Hearts_Three</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Two.png">
<Name>Hearts_Two</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Hearts_Ten.png">
<Name>Hearts_Ten</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Ace.png">
<Name>Spade_Ace</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Eight.png">
<Name>Spade_Eight</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Five.png">
<Name>Spade_Five</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Four.png">
<Name>Spade_Four</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Jack.png">
<Name>Spade_Jack</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_King.png">
<Name>Spade_King</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Nine.png">
<Name>Spade_Nine</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Queen.png">
<Name>Spade_Queen</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Seven.png">
<Name>Spade_Seven</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Six.png">
<Name>Spade_Six</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Ten.png">
<Name>Spade_Ten</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Three.png">
<Name>Spade_Three</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="Spade_Two.png">
<Name>Spade_Two</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="button_stay_hover.png">
<Name>button_stay_hover</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="button_stay_normal.png">
<Name>button_stay_normal</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="scoreboard_bg.png">
<Name>scoreboard_bg</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="ScoreboardFont.spritefont">
<Name>ScoreboardFont</Name>
<Importer>FontDescriptionImporter</Importer>
<Processor>FontDescriptionProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="status_blackjack.png">
<Name>status_blackjack</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="status_busted.png">
<Name>status_busted</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="status_stay.png">
<Name>status_stay</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="game_bgm.wav">
<Name>game_bgm</Name>
<Importer>WavImporter</Importer>
<Processor>SoundEffectProcessor</Processor>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="button_deal_hover.png">
<Name>button_deal_hover</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
<Compile Include="button_deal_normal.png">
<Name>button_deal_normal</Name>
<Importer>TextureImporter</Importer>
<Processor>TextureProcessor</Processor>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Some files were not shown because too many files have changed in this diff Show More