Example #1
0
 public void GetMove(NetworkStream ns, View view, Game game )
 {
     BinaryFormatter formatter = new BinaryFormatter();
     Position from = (Position)formatter.Deserialize(ns);
     Position to = (Position)formatter.Deserialize(ns);
     // view
     view.Invoke(new Action(
         () => { game.Cell_Click(from); Thread.Sleep(100); game.Cell_Click(to); }));
 }
Example #2
0
        public void GetMove(NetworkStream ns, View view, Game game)
        {
            BinaryFormatter formatter = new BinaryFormatter();
            Position        from      = (Position)formatter.Deserialize(ns);
            Position        to        = (Position)formatter.Deserialize(ns);

            // view
            view.Invoke(new Action(
                            () => { game.Cell_Click(from); Thread.Sleep(100); game.Cell_Click(to); }));
        }
Example #3
0
        private void Cell_Click(object sender, EventArgs e)
        {
            if (game.isRemoteJob())
            {
                return;
            }
            Button   btn = (Button)sender;
            Position pos = (Position)btn.Tag;

            game.Cell_Click(pos);
        }