Click here to Skip to main content
13,558,244 members
Click here to Skip to main content

Stats

20.6K views
497 downloads
17 bookmarked
Posted 12 May 2009
Licenced CPOL

Reversi for Windows Mobile

, 12 May 2009
The game Reversi for Windows Mobile using the Compact Framework.
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using GameExample.Reversi;

namespace GameExample
{
    public partial class MainMenuControl : GameScreenControl
    {

        public MainMenuControl()
        {
            InitializeComponent();
            gameButtonHeader.Font = GameStyles.HeaderFont;
            gameButtonHelp.Font = GameStyles.ButtonFont;
            gameButtonPlay.Font = GameStyles.ButtonFont;
            gameButtonQuit.Font = GameStyles.ButtonFont;
            gameButton1.Font = GameStyles.SubHeaderFont;
        }

        private void GameButton_Click(object sender, EventArgs e)
        {
            GameScreen screen = GameScreen.Unknown;
            if (sender == gameButtonHelp)
            {
                screen = GameScreen.Help;
            }
            else if (sender == gameButtonPlay)
            {
                screen = GameScreen.Play;
            }
            else if (sender == gameButtonQuit)
            {
                Application.Exit();
            }
            if (screen != GameScreen.Unknown)
            {
                CurrentGame.SetScreen(screen);
            }
        }


    }
}

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...

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