Click here to Skip to main content
15,884,177 members
Articles / Mobile Apps / Windows Mobile

Reversi for Windows Mobile

Rate me:
Please Sign up or sign in to vote.
4.86/5 (4 votes)
12 May 2009CPOL3 min read 27K   531   17  
The game Reversi for Windows Mobile using the Compact Framework.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace GameExample.Reversi
{
    /// <summary>
    /// The game options.
    /// </summary>
    public class GameOptions
    {
        /// <summary>
        /// Gets or sets the width of the board.
        /// </summary>
        /// <value>The width of the board.</value>
        public int BoardWidth { get; set; }
        /// <summary>
        /// Gets or sets the height of the board.
        /// </summary>
        /// <value>The height of the board.</value>
        public int BoardHeight { get; set; }
        
        /// <summary>
        /// Gets or sets a value indicating whether [sounds enabled].
        /// </summary>
        /// <value><c>true</c> if [sounds enabled]; otherwise, <c>false</c>.</value>
        public bool SoundsEnabled { get; set; }

        /// <summary>
        /// Gets or sets the player one.
        /// </summary>
        /// <value>The player one.</value>
        public PlayerType PlayerOne { get; set; }

        /// <summary>
        /// Gets or sets the player two.
        /// </summary>
        /// <value>The player two.</value>
        public PlayerType PlayerTwo { get; set; }

        /// <summary>
        /// Gets the default.
        /// </summary>
        /// <value>The default.</value>
        public static GameOptions Default
        {
            get {
                return new GameOptions() { BoardHeight = 8, BoardWidth = 8, SoundsEnabled = true,
                PlayerOne = PlayerType.Person, PlayerTwo = PlayerType.Computer};
            }
        }
    }
}

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)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions