Ejemplo n.º 1
0
 public Game(OppCommMode mode, string strategy, string sessionSSID, sendMessageDelegate msgDelegate, updateListbox msgListBoxDelegate, updateCredibility credibilityDelegate, restartProbing reProbingDelegate)
 {
     this.gameMode = mode;
     this.strategy = strategy;
     this.sessionID = sessionSSID;
     this.sendMsgDelegate = msgDelegate;
     this.msgListBoxDelegate = msgListBoxDelegate;
     this.credibilityDelegate = credibilityDelegate;
     this.restartProbingDelegate = reProbingDelegate;
     this.state = GameState.Started;
 }
Ejemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            strategyComboBox.SelectedItem = (object)"Select Strategy";

            messageDelegate = SendMessage;

            updateMsgListBox = addMessageToListBox;

            credibilityDelegate = UpdateCredibility;

            OppCommRequestCallBack = NeighborJoined;

            restartProbingDelegate = RestartProbing;

            ToggleControls(true);

            CommonUtilities.Logger.flushAll();

            //This only initiates the device advertisement
            oppCommHandler = OppCommHandler.getInstance();
            deviceIDLabel.Text = DeviceID.GetInstance().ToIDString();

            //Read existing credibility history.
            ReadCredibilityHistory();
        }