Add robot baccarat to online Fox chess and card games

Source: Internet
Author: User

The robot function platform of the online Fox platform has been implemented, and all interfaces have been defined. You only need to implement this interface.

Class candroiduseritemsink: Public iandroiduseritemsink
{

// Control variable
Protected:
Cgamelogic m_gamelogic; // game logic
Iandroiduseritem * m_piandroiduseritem; // user interface

// Function Definition
Public:
// Constructor
Candroiduseritemsink ();
// Destructor
Virtual ~ Candroiduseritemsink ();

// Basic interface
Public:
// Release the object
Virtual void _ cdecl release () {}// if (isvalid () {Delete this ;} return;
// Valid or not
Virtual bool _ cdecl isvalid () {return afxisvalidaddress (this, sizeof (candroiduseritemsink ))? True: false ;}
// Interface Query
Virtual void * _ cdecl QueryInterface (const IID & guid, DWORD dwqueryver );

// Control Interface
Public:
// Initial interface
Virtual bool _ cdecl inituseritemsink (iunknownex * piunknownex );
// Reset the interface
Virtual bool _ cdecl reposituseritemsink ();

// Game events
Public:
// Time Message
Virtual bool _ cdecl oneventtimer (uint ntimerid );
// Game message
Virtual bool _ cdecl oneventgamemessage (word wsubcmdid, void * pdata, word wdatasize );
// Game message
Virtual bool _ cdecl oneventframemessage (word wsubcmdid, void * pdata, word wdatasize );
// Scenario message
Virtual bool _ cdecl oneventgamescene (byte cbgamestatus, bool blookonother, void * pdata, word wdatasize );

// User event
Public:
// Enter
Virtual void _ cdecl oneventuserenter (iandroiduseritem * piandroiduseritem, bool blookonuser );
// The user leaves
Virtual void _ cdecl oneventuserleave (iandroiduseritem * piandroiduseritem, bool blookonuser );
// User points
Virtual void _ cdecl oneventuserscore (iandroiduseritem * piandroiduseritem, bool blookonuser );
// User status
Virtual void _ cdecl oneventuserstatus (iandroiduseritem * piandroiduseritem, bool blookonuser );
// User Field
Virtual void _ cdecl oneventusersegment (iandroiduseritem * piandroiduseritem, bool blookonuser );
}

 

The implementation of this interface is actually very simple. The robot is a game player cgameclientdlg that has implemented all the functions. We just need to implement these functions again in the machine human, if the communication between various game modules is the blood of the life process, the game's operation interface is the body of a living body,

Ordinary game players need an interface to achieve a beautiful and user-friendly operation effect, while robots have no flesh and blood, but there is no lack of smooth blood, blood surging, the robot has a soul, because our job is to ensure that robots have souls! A simple method is to copy all the functions in cgameclientdlg and remove the code for all interface operations! It's easy. Isn't it as much trouble as we thought!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.