All pastes #587423 Raw Edit

Stuff

public text v1 · immutable
#587423 ·published 2007-06-24 15:45 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Chief
{
    /*public interface Bot
    {
        void Initiate(Game game);
        void GameEnter();
        void GameExit();
    }*/

    public abstract class Bot
    {
        public Game Game;
        private Thread GameEnterThread;

        public void Initiate(Game game)
        {
            this.Game = game;
        }

        public void GameEnterThatCreatesThread()
        {
            this.GameEnterThread = new Thread(new ThreadStart(GameEnter));
            this.GameEnterThread.Start();
        }

        public void GameExitThatDestroysThread()
        {
            this.GameEnterThread.Abort();
        }

        public abstract void GameEnter();
        public abstract void GameExit();
    }
}