Click here to Skip to main content
15,885,216 members
Articles / Web Development / HTML

Zyan Drench, A Game for Android with Wifi Support

Rate me:
Please Sign up or sign in to vote.
4.99/5 (17 votes)
28 Feb 2016MIT12 min read 47.1K   1.3K   37  
This article describes building an Android game with networking support using C#, Xamarin.Android platform and Zyan Communication Framework.
using System;
using System.Collections.Generic;

namespace Drench
{
	/// <summary>
	/// Drench game interface.
	/// </summary>
	public interface IDrenchGame
	{
		/// <summary>
		/// Gets the board.
		/// </summary>
		/// <value>The board.</value>
		DrenchBoard Board { get; }

		/// <summary>
		/// Starts a new game.
		/// </summary>
		void NewGame();

		/// <summary>
		/// Makes the move.
		/// </summary>
		/// <param name="color">Color.</param>
		void MakeMove(int color);

		/// <summary>
		/// Gets a value indicating whether this game is stopped.
		/// </summary>
		bool IsStopped { get; }

		/// <summary>
		/// Gets a value indicating whether this game can be restarted.
		/// </summary>
		bool CanRestartGame { get; }

		/// <summary>
		/// Gets the number of the current move.
		/// </summary>
		int CurrentMove { get; }

		/// <summary>
		/// Gets the current game status text.
		/// </summary>
		string CurrentStatus { get; }

		/// <summary>
		/// Gets the forbidden colors for the current move.
		/// </summary>
		IEnumerable<int> ForbiddenColors { get; }

		/// <summary>
		/// Occurs when the board state has changed.
		/// </summary>
		event EventHandler GameChanged;

		/// <summary>
		/// Occurs when the game is stopped.
		/// </summary>
		event EventHandler<StopEventArgs> GameStopped;
	}
}

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 MIT License


Written By
Software Developer (Senior) ULTIMA Businessware
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions