📄 black jackview.cpp
字号:
// Black JackView.cpp : implementation of the CBlackJackView class
//
#include "stdafx.h"
#include "Black Jack.h"
#include "Black JackDoc.h"
#include "stdlib.h"
#include "time.h"
#include "Black JackView.h"
#include "options.h"
#include "bet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define CARD_X 71
#define CARD_Y 96
#define card_shift 20
#define plyr "Player"
#define dealr "Dealer"
#define min_odds 0.45f
/////////////////////////////////////////////////////////////////////////////
// CBlackJackView
IMPLEMENT_DYNCREATE(CBlackJackView, CView)
BEGIN_MESSAGE_MAP(CBlackJackView, CView)
//{{AFX_MSG_MAP(CBlackJackView)
ON_WM_MOUSEMOVE()
ON_COMMAND(ID_HIT, OnHit)
ON_COMMAND(ID_OPTIONS, OnOptions)
ON_COMMAND(ID_RULES, OnRules)
ON_COMMAND(ID_SPLIT, OnSplit)
ON_UPDATE_COMMAND_UI(ID_SPLIT, OnUpdateSplit)
ON_COMMAND(ID_STAND, OnStand)
ON_COMMAND(ID_SURRENDER, OnSurrender)
ON_UPDATE_COMMAND_UI(ID_SURRENDER, OnUpdateSurrender)
ON_COMMAND(ID_DOUBLE, OnDouble)
ON_UPDATE_COMMAND_UI(ID_DOUBLE, OnUpdateDouble)
ON_WM_SIZE()
ON_COMMAND(ID_NEW_ROUND, OnNewRound)
ON_WM_LBUTTONDOWN()
ON_COMMAND(ID_SHUFFLE, OnShuffle)
ON_COMMAND(ID_ACTIVATE_COUNT, OnActivateCount)
ON_COMMAND(ID_ACTIVATE_DECKVIEW, OnActivateDeckview)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBlackJackView construction/destruction
void CBlackJackView::OnRules() // THIS IS A JOKE
{
if(!rant){
AfxMessageBox("WHAT?!?!? You don't know how to play Black Jack?");
AfxMessageBox("Thou shalt be SHUNNED!");
AfxMessageBox("Well, it's real simple... Click on \"Hit\"");
AfxMessageBox("And keep clicking until is says \"Click to continue\"");
AfxMessageBox("You know, every dollar you lose in this game gets taken from your bank account");
AfxMessageBox("I'm gonna make a fortune off this, stealing everybody's money from their bank accounts");
AfxMessageBox("Ok, so I lied.");
AfxMessageBox("So sue me.");
AfxMessageBox("No, on second thought *don't* sue me");
AfxMessageBox("Especially since I can make the computer win...");
AfxMessageBox("Player: 2 & Ace, Computer: Ace & Queen, and so on and so forth");
AfxMessageBox("I could even be real mean.");
AfxMessageBox("Player Ace & King, Computer: Two & Six. Winner: Computer");
AfxMessageBox("But that would be too mean");
AfxMessageBox("Time to stop rambling now");
AfxMessageBox("Additionally, this program contains the ability to insinuate itself into the registry, the network's registry, and your other files.\nWould you like it to do this?",MB_YESNO|MB_ICONQUESTION);
AfxMessageBox("It can also install a virus... A very nasty javascript one too.\nInstall?",MB_YESNO|MB_ICONQUESTION);
AfxMessageBox("It can also install the following items:\n\tAuto-HD nuker v3.09\n\tMonitor Smoke
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -