예제 #1
0
파일: GameTable.cs 프로젝트: JakLiao/Gobang
        private System.Timers.Timer timer; //用于定时产生棋子

        #endregion Fields

        #region Constructors

        public GameTable(ListBox listbox)
        {
            gamePlayer = new Player[2];
            gamePlayer[0] = new Player();
            gamePlayer[1] = new Player();
            timer = new System.Timers.Timer();
            //timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
            timer.Enabled = false;
            this.listbox = listbox;
            this.turn = -1;  //edit
            service = new Service(listbox);
            ResetGrid();
        }
예제 #2
0
 public FormServer()
 {
     InitializeComponent();
     service = new Service(listBox1);
 }