Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Checkers for Pocket PC using a Recursive Min-Max Tree

, 19 Jun 2008
Checkers/Draughts game for Pocket PC, using the recursive Min-Max tree to calculate moves, coded with C# over the .NET Compact Framework
checkers20_cab.zip
GamesPackage
GamesPackage.csdproj
GamesPackage.csdproj.user
GamesPackage.csproj.user
GamesPackage.resharperoptions
GamesPackage.suo
SoundPPCLibrary
SoundPPCLibrary.csdproj
SoundPPCLibrary.csdproj.user
SoundPPCLibrary.csproj.user
SoundPPCLibrary.resharperoptions
SoundPPCLibrary.suo
BoardEngine
BoardEngine.csdproj
BoardEngine.csdproj.user
BoardEngine.csproj.user
Checkers
001_select_checker_0.wav
002_select_destination_0.wav
003_player_move_0.wav
004_eat_a_player_0.wav
005_end_of_the_board_0.wav
006_game_over_0.wav
007_win_game_0.wav
CHECKER.ico
Checkers.csdproj
Checkers.csdproj.user
Checkers.csproj.user
Checkers.resharper.user
Checkers.resharperoptions
Checkers.suo
checkersico.ico
Thumbs.db
checkers_source.zip
Checkers.csdproj
Checkers.csdproj.user
Checkers.csproj.user
checkersico.ico
001_select_checker_0.wav
002_select_destination_0.wav
003_player_move_0.wav
004_eat_a_player_0.wav
005_end_of_the_board_0.wav
006_game_over_0.wav
007_win_game_0.wav
CHECKER.ico
using System;
using System.Data;
using System.Collections;

namespace GamesPackage
{
	
	/// <summary>
	/// Defines what a player should implement
	/// </summary>
	public interface IPlayer 
	{
		/// <summary>
		/// Called by the moderator when this player tried to make a move and was an invalid one.
		/// </summary>
		/// <param name="move"></param>
		void InvalidMove(IMove move);

		/// <summary>
		/// Called by moderator indicating the player that the games is over and idicating also if this player won or loose.
		/// </summary>
		/// <param name="winner"></param>
		void GameOver(bool winner);


		/// <summary>
		/// Called when the game end by any other mistake like network crashes, or any kind of failure
		/// </summary>
		void GameHalted(Exception cause);


		/// <summary>
		/// Called by moderator to inform this player that another player has performed a move sucefully
		/// </summary>
		/// <param name="player"></param>
		/// <param name="move"></param>
		void MovedPerformed(IPlayer player, IMove move);
	

		/// <summary>
		/// Called by the moderator indicating the player that is his turn to play, 
		/// </summary>
		/// <param name="state">The game state this player need to know, the player must use this info for playing/thinkin his move and then raise the even OnPerformMove</param>
        void Play(IGameStateForPlayer info);

		/// <summary>
		/// Event raised by the player to perform a move, the moderator must be suscribed to this event
		/// </summary>
		event PerformMove OnPerformMove;


	}

    
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Leonardo Paneque
Team Leader
United States United States
Leonardo loves to code with C# and thinks .NET platforms rocks.
He has a Master degree in Computer Sciences and likes to share code and ideas.
Follow on   Twitter

| Advertise | Privacy | Mobile
Web03 | 2.8.140922.1 | Last Updated 20 Jun 2008
Article Copyright 2008 by Leonardo Paneque
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid