コード例 #1
0
 public HandController(bool isNpc, RPSLSController c)
 {
     model           = new HandModel(this);
     view            = new HandView(this, isNpc);
     model.IsNpc     = isNpc;
     rpslsController = c;
 }
コード例 #2
0
 public HandController(bool isNpc, RPSLSController c)
 {
     model = new HandModel(this);
       view = new HandView(this, isNpc);
       model.IsNpc = isNpc;
       rpslsController = c;
 }
コード例 #3
0
        public List <HandView> GetViewHands()
        {
            List <HandView> viewOfHands = new List <HandView>();

            foreach (HandController hand in playerArray)
            {
                HandView handView = hand.getView();
                viewOfHands.Add(handView);
            }
            return(viewOfHands);
        }
コード例 #4
0
        private void RPSLSView_Load(object sender, EventArgs e)
        {
            List <HandView> hands = controller.GetViewHands();

            int handWidth  = hands.First().Width;
            int handHeight = hands.First().Height;

            this.Width  = handWidth * hands.Count;
            this.Height = handHeight;
            Console.WriteLine("HandSize: " + handWidth + "," + handHeight);
            Console.WriteLine("RPSLS Size: " + Width + "," + Height);

            foreach (HandView hand in hands)
            {
                HandView tempHand = hand;
                int      xPos     = hands.IndexOf(hand) * handWidth;
                hand.Location = new Point(xPos, 0);
                Controls.Add(tempHand);
            }
        }