Click here to Skip to main content
12,296,833 members (63,502 online)
Click here to Skip to main content

Stats

16.2K views
462 downloads
17 bookmarked
Posted

Reversi for Windows Mobile

, 12 May 2009 CPOL
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)

Share

About the Author

Ziad Elmalki
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 13 May 2009
Article Copyright 2009 by Ziad Elmalki
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid