コード例 #1
0
ファイル: PlayerFields.cs プロジェクト: MartyIX/SoTh
        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
ファイル: SecondPlayer.cs プロジェクト: MartyIX/SoTh
 /// <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;
 }