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();
        }
Ejemplo n.º 3
0
        private void GameView_Load(object sender, EventArgs e)
        {
            RPSLSView             rpslsView   = controller.GetRPSLSView();
            List <ScoreBoardView> scoreboards = controller.GetScoreboardViews();
            int scoreboardWidth  = scoreboards.First().Width;
            int scoreboardHeight = scoreboards.First().Height;

            //scoreboardView.Width = 100;
            //scoreboardView.Height = 100;
            //scoreboards.Location = new Point(0, 200);
            this.Width = scoreboards.Count();
            //this.Width = rpslsView.Width;
            this.Height = 400;

            foreach (ScoreBoardView scoreboard in scoreboards)
            {
                ScoreBoardView tempScoreboard = scoreboard;
                int            xPos           = scoreboards.IndexOf(scoreboard) * scoreboardWidth;
                scoreboard.Location = new Point(xPos, 230);
                Controls.Add(tempScoreboard);
            }

            // Debugging
            Console.WriteLine("RPSLS Location: " + rpslsView.Location);
            Console.WriteLine("RPSLS Height: " + rpslsView.Height);
            Controls.Add(rpslsView);
        }