public RPSLSController(GameController c, int amountOfPlayers)
        {
            int playerCount = 0;
              playerArray = new HandController[amountOfPlayers];
              for (int i = 0; i < amountOfPlayers; i++)
              {
            if (i > 0)  // Meerdere nps's
            {
              playerArray[i] = new HandController(true, this);
            }
            else    // Enkel 1 player
            {
              playerArray[i] = new HandController(false, this);
            }
              }

              //player = new HandController(false, this);
              //playerArray[playerCount] = player;
              //playerCount++;

              //npc = new HandController(true, this);
              //playerArray[playerCount] = npc;
              //playerCount++;

              model = new RPSLSModel(amountOfPlayers);
              view = new RPSLSView(this);

              gameController = c;

              StartTurn();
        }
        public RPSLSController(GameController c, int amountOfPlayers)
        {
            int playerCount = 0;

            playerArray = new HandController[amountOfPlayers];
            for (int i = 0; i < amountOfPlayers; i++)
            {
                if (i > 0) // Meerdere nps's
                {
                    playerArray[i] = new HandController(true, this);
                }
                else // Enkel 1 player
                {
                    playerArray[i] = new HandController(false, this);
                }
            }

            //player = new HandController(false, this);
            //playerArray[playerCount] = player;
            //playerCount++;

            //npc = new HandController(true, this);
            //playerArray[playerCount] = npc;
            //playerCount++;

            model = new RPSLSModel(amountOfPlayers);
            view  = new RPSLSView(this);

            gameController = c;

            StartTurn();
        }
Пример #3
0
        public HandView(HandController c, bool isNpc)
        {
            InitializeComponent();

            controller = c;

            if (isNpc)
            {
                lblNaam.Text = "NPC";
            }
            else if (!isNpc)
            {
                lblNaam.Text = "Player";
            }
            btnLizard.Enabled   = false;
            btnPaper.Enabled    = false;
            btnRock.Enabled     = false;
            btnScissors.Enabled = false;
            btnSpock.Enabled    = false;
        }
        public HandView(HandController c, bool isNpc)
        {
            InitializeComponent();

              controller = c;

              if (isNpc)
              {
            lblNaam.Text = "NPC";

              }
              else if (!isNpc)
              {
            lblNaam.Text = "Player";
              }
              btnLizard.Enabled = false;
              btnPaper.Enabled = false;
              btnRock.Enabled = false;
              btnScissors.Enabled = false;
              btnSpock.Enabled = false;
        }
 public HandModel(HandController c)
 {
     randomGenerator = new Random();
       controller = c;
 }
Пример #6
0
 public HandModel(HandController c)
 {
     randomGenerator = new Random();
     controller      = c;
 }