示例#1
0
        public Player(GameDeskView form, int posX, int posY)
        {
            this.form = form;

            round = 1;
            roundsNo = 0;
            /*
            gameDesk = new GameDesk(form, this);
            gameDesk.Location = new System.Drawing.Point(posX, posY);
            gameDesk.Name = "gameDesk";
            gameDesk.Size = new System.Drawing.Size(396, 386); // not needed
            gameDesk.TabIndex = 0;
            gameDesk.Text = "gameDesk";
            form.Controls.Add(gameDesk);
            */
            //profile = new ProfileRepository(form, this);
            profile = ProfileRepository.Instance;
        }
示例#2
0
 /// <summary>
 /// Class Player creates gamedesk
 /// </summary>
 public SecondPlayer(GameDeskView form, int posX, int posY)
     : base(form, posX, posY)
 {
     this.form = form;
     eventBuffer = new Queue<Event>();
     playerType = PlayerType.NotDecided;
     messageToSend = new byte[1200];
     receivedMessage = new byte[1200];
     nmp = new NetworkMessageProtocol();
     nmp.NetworkTimeChanged += new d_NetworkTimeChanged(SynchronizeWithNetworkTime);
     nmp.EventWasRead += new d_SimulationEventHandler(OnEventWasRead);
     nmp.PlayerFinishedRound += new d_PlayerFinishedRound(ReceivedVictoryMessage);
 }
示例#3
0
文件: Replay.cs 项目: MartyIX/SoTh
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="form">Reference to main form</param>
 public LogList(GameDeskView form, Player player)
 {
     this.player = player;
     this.form = form;
 }