public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 5)
     {
         p.addIChip(1);
         return (p.getPlayerName() + " played " + thisImage + " for 1 integrity chip");
     }
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 17)
     {
         p.addCChip(1);
         return (p.getPlayerName() + " played " + thisImage + " for 1 craft chip");
     }
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 3
0
 public override string Play(Player p)
 {
     /*if (p.getCurrentRoom() == 14)
     {
         p.addLChip(1);
         return (p.getPlayerName() + " played Professor Murgolo's CECS 174 Class for 1 learning chip");
     }*/
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 4
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() < 10 && p.getCurrentRoom() != 6)
     {
         choseChip chose = new choseChip(1, 1, 1, p);
         p.addChipChosen(chose.getChoice());
         return (p.getPlayerName() + " played " + thisImage + " for " + chose.getChoice());
     }
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 16 && p.getLChip() > 3)
     {
         p.addCChip(2);
         return (p.getPlayerName() + " played " + thisImage + " for 2 craft chips");
     }
     p.addQPoint(-2);
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 6
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 6)
     {
         p.addLChip(2);
         p.discardPick();
         return (p.getPlayerName() + " played " + thisImage + " for 2 learning chips");
     }
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 7
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 13 && p.getCChip() > 5 && p.getIChip() > 5 && p.getLChip() > 5)
     {
         p.addQPoint(10);
         return (p.getPlayerName() + " played " + thisImage + " for 10 Quality Points!");
     }
     p.discardPick();
     return (p.getPlayerName() + " played " + thisImage + " FAILED losing 1 game card");
 }
Exemplo n.º 8
0
 public override string Play(Player p)
 {
     if ((p.getCurrentRoom() == 12 || p.getCurrentRoom() == 15) && p.getLChip() > 5)
     {
         p.addQPoint(5);
         return (p.getPlayerName() + " played " + thisImage + " for 5 Quality Points");
     }
     p.setCurrentRoom(2);
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 9
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 0 && p.getCChip() > 4)
     {
         p.addQPoint(5);
         return (p.getPlayerName() + " played " + thisImage + " for 5 Quality Points!");
     }
     p.addQPoint(-3);
     return (p.getPlayerName() + " played " + thisImage + " FAILED: Lose 3 Quality Points");
 }
Exemplo n.º 10
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 0 && p.getCChip() > 2)
     {
         p.addQPoint(5);
         p.addIChip(1);
         return (p.getPlayerName() + " played " + thisImage + " for 5 Quality Points and 1 integrity chip");
     }
     p.setCurrentRoom(2);
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 11
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 0 && p.getLChip() > 2 && p.getCChip() > 2)
     {
         p.addQPoint(5);
         p.addExtraCard();
         return (p.getPlayerName() + " played " + thisImage + " for 5 Quality Points and 1 game card");
     }
     p.setCurrentRoom(2);
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 12
0
 public override string Play(Player p)
 {
     if ((p.getCurrentRoom() == 17 || p.getCurrentRoom() == 14) && p.getLChip() > 4)
     {
         p.addQPoint(5);
         return (p.getPlayerName() + " played " + thisImage + " for 5 Quality Points!");
     }
     p.addQPoint(-3);
     p.discardPick();
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 13
0
 public override string Play(Player p)
 {
     if ((p.getCurrentRoom() == 12 || p.getCurrentRoom() == 15) && p.getLChip() > 2 && p.getCChip() > 2 && p.getIChip() > 2)
     {
         p.addQPoint(5);
         p.addExtraCard();
         return (p.getPlayerName() + " played " + thisImage + " for 5 Quality points and 1 game card");
     }
     p.discardPick();
     return (p.getPlayerName() + " played " + thisImage + " FAILED: lose a card");
 }
Exemplo n.º 14
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 19 && p.getIChip() > 2)
     {
         choseChip chose = new choseChip(1, 1, 1, p);
         p.addChipChosen(chose.getChoice());
         return (p.getPlayerName() + " played " + thisImage + " for " + chose.getChoice());
     }
     p.discardPick();
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 15
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 1 && p.getLChip() > 2)
     {
         p.addIChip(1);
         p.addCChip(1);
         return (p.getPlayerName() + " played " + thisImage + " for 1 integrity chip and 1 craft chip");
     }
     p.setCurrentRoom(20);
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 16
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 18 && p.getCChip() > 2)
     {
         choseChip chose = new choseChip(1, 1, 1, p);
         p.addChipChosen(chose.getChoice());
         return (p.getPlayerName() + " played " + thisImage + " for " + chose.getChoice());
     }
     p.addQPoint(-2);
     return (p.getPlayerName() + " played " + thisImage + " FAILED: Lose 2 Quality Points");
 }
Exemplo n.º 17
0
 public override string Play(Player p)
 {
     if (p.getCurrentRoom() == 7 && p.getLChip() > 1)
     {
         p.addLChip(1);
         p.addExtraCard();
         return (p.getPlayerName() + " played " + thisImage + " for 1 learning chip and 1 game card");
     }
     p.addQPoint(-2);
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 18
0
 public override string Play(Player p)
 {
     if ((p.getCurrentRoom() == 12 || p.getCurrentRoom() == 15) && p.getIChip() > 1)
     {
         p.addQPoint(3);
         choseChip chose = new choseChip(1, 1, 1, p);
         p.addChipChosen(chose.getChoice());
         return (p.getPlayerName() + " played " + thisImage + " for 3 Quality Points" + chose.getChoice());
     }
     p.discardPick();
     return (p.getPlayerName() + " played " + thisImage + " FAILED");
 }
Exemplo n.º 19
0
        //will take in the data and make a person chose the available chips and update choice with the decision
        public choseChip(int l, int c, int i, Player p)
        {
            choice = "";
            lblMessage = new Label();
            integrityChipButton = new Button();
            craftChipButton = new Button();
            learningChipButton = new Button();
            integrityChipButton.Text = "Integrity Chip";
            craftChipButton.Text = "Craft Chip";
            learningChipButton.Text = "Learning Chip";
            lblMessage.Text = "Choose a chip";
            lblMessage.Size = new System.Drawing.Size(413, 82);
            lblMessage.Font = new System.Drawing.Font(lblMessage.Font.FontFamily, 24);

            integrityChipButton.Size = new System.Drawing.Size(120, 30);
            integrityChipButton.Location = new System.Drawing.Point((ClientRectangle.Width -
                integrityChipButton.Size.Width) / 2, ClientRectangle.Height - 35);
            Controls.AddRange(new System.Windows.Forms.Control[] { this.integrityChipButton });

            craftChipButton.Size = new System.Drawing.Size(120, 30);
            craftChipButton.Location = new System.Drawing.Point((ClientRectangle.Width -
                craftChipButton.Size.Width) / 2, ClientRectangle.Height - 105);
            Controls.AddRange(new System.Windows.Forms.Control[] { this.craftChipButton });

            learningChipButton.Size = new System.Drawing.Size(120, 30);
            learningChipButton.Location = new System.Drawing.Point((ClientRectangle.Width -
                learningChipButton.Size.Width) / 2, ClientRectangle.Height - 175);
            Controls.AddRange(new System.Windows.Forms.Control[] { this.learningChipButton});
            learningChipButton.Click += new System.EventHandler(integrityChipButton_Click);
            learningChipButton.Click += new System.EventHandler(learningChipButton_Click);
            craftChipButton.Click += new System.EventHandler(craftChipButton_Click);
            this.Controls.Add(lblMessage);
            if(i == 1)
            {
                this.Controls.Add(integrityChipButton);
            }
            if(l == 1)
            {
                this.Controls.Add(craftChipButton);
            }
            if(c == 1)
            {
                this.Controls.Add(learningChipButton);
            }
            this.Show();
        }
Exemplo n.º 20
0
 public abstract string Play(Player p);
Exemplo n.º 21
0
 private void Form1_Load(object sender, EventArgs e)
 {
     MoveButton.Enabled = false;
     deck =  new List<CardInterface>();
     discardDeck =  new List<CardInterface>();
     roomArray = new Room[21];
     playerArray = new Player[3];
     /**
     if (Screen.PrimaryScreen.Bounds.Width > 1670)
         this.Width = 1670;
     else
         this.Width = Screen.PrimaryScreen.Bounds.Width;
     if (Screen.PrimaryScreen.Bounds.Height > 2100)
         this.Height = 2000;
     else
         this.Height = Screen.PrimaryScreen.Bounds.Height - 100;
      **/
     this.splitContainer1.Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 3;
     this.splitContainer1.Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height / 3;
     playerArray[0] = new Player("John", 2);
     playerArray[1] = new Player("Kyle", 2);
     playerArray[2] = new Player("Martha", 2);
     Random rnd = new Random();
     // shuffle player array
     int n = playerArray.Length;
     while (n > 1)
     {
         int k = rnd.Next(n--);
         Player temp = playerArray[n];
         playerArray[n] = playerArray[k];
         playerArray[k] = temp;
     }
     roomArray[0] = new Room("George Allen Field",0, button1, button2, button3);
     roomArray[1] = new Room("Japanese Garden",1, button6, button5, button4);
     roomArray[2] = new Room("Student Parking",2, button9, button8, button7);
     roomArray[3] = new Room("Pyramid",3, button12, button11, button10);
     roomArray[5] = new Room("Rec Center",5, button15, button14, button13);
     roomArray[6] = new Room("Forbidden Parking",6, button18, button17, button16);
     roomArray[4] = new Room("West Walkway",4, button63, button62, button61);
     roomArray[10] = new Room("East Walkway",10, button51, button50, button49);
     roomArray[11] = new Room("Computer Lab",11, button21, button20, button19);
     roomArray[14] = new Room("ECS 302",14, button24, button23, button22);
     roomArray[18] = new Room("Eat Club",18, button27, button26, button25);
     roomArray[19] = new Room("Conference Room",19, button30, button29, button28);
     roomArray[12] = new Room("North Hall",12, button33, button32, button31);
     roomArray[15] = new Room("South Hall",15, button36, button35, button34);
     roomArray[13] = new Room("Room Of Retirement",13, button39, button38, button37);
     roomArray[16] = new Room("Elevators",16, button42, button41, button40);
     roomArray[17] = new Room("ECS 308",17, button45, button44, button43);
     roomArray[20] = new Room("Lactation Lounge",20, button48, button47, button46);
     roomArray[7] = new Room("Library",7, button54, button53, button52);
     roomArray[8] = new Room("LA 5",8, button57, button56, button55);
     roomArray[9] = new Room("Bratwurst Hall",9, button60, button59, button58);
     roomArray[0].addNextTo(1);
     roomArray[0].addNextTo(3);
     roomArray[0].addNextTo(5);
     roomArray[0].addNextTo(4);
     roomArray[1].addNextTo(0);
     roomArray[1].addNextTo(3);
     roomArray[1].addNextTo(2);
     roomArray[2].addNextTo(1);
     roomArray[2].addNextTo(3);
     roomArray[2].addNextTo(5);
     roomArray[2].addNextTo(6);
     roomArray[3].addNextTo(0);
     roomArray[3].addNextTo(1);
     roomArray[3].addNextTo(2);
     roomArray[3].addNextTo(5);
     roomArray[4].addNextTo(0);
     roomArray[4].addNextTo(5);
     roomArray[4].addNextTo(12);
     roomArray[4].addNextTo(7);
     roomArray[5].addNextTo(0);
     roomArray[5].addNextTo(3);
     roomArray[5].addNextTo(2);
     roomArray[5].addNextTo(6);
     roomArray[5].addNextTo(4);
     roomArray[6].addNextTo(2);
     roomArray[6].addNextTo(5);
     roomArray[6].addNextTo(10);
     roomArray[7].addNextTo(4);
     roomArray[7].addNextTo(8);
     roomArray[8].addNextTo(7);
     roomArray[8].addNextTo(16);
     roomArray[8].addNextTo(9);
     roomArray[9].addNextTo(8);
     roomArray[9].addNextTo(10);
     roomArray[10].addNextTo(6);
     roomArray[10].addNextTo(9);
     roomArray[10].addNextTo(15);
     roomArray[11].addNextTo(12);
     roomArray[12].addNextTo(4);
     roomArray[12].addNextTo(11);
     roomArray[12].addNextTo(14);
     roomArray[12].addNextTo(15);
     roomArray[12].addNextTo(16);
     roomArray[12].addNextTo(13);
     roomArray[14].addNextTo(15);
     roomArray[14].addNextTo(12);
     roomArray[15].addNextTo(12);
     roomArray[15].addNextTo(14);
     roomArray[15].addNextTo(18);
     roomArray[15].addNextTo(19);
     roomArray[15].addNextTo(10);
     roomArray[15].addNextTo(20);
     roomArray[15].addNextTo(17);
     roomArray[16].addNextTo(12);
     roomArray[16].addNextTo(8);
     roomArray[17].addNextTo(15);
     roomArray[18].addNextTo(15);
     roomArray[19].addNextTo(15);
     roomArray[20].addNextTo(15);
     deck.Add(new EnjoyingNature());
     deck.Add(new EnjoyingThePeace());
     deck.Add(new ANewLaptop());
     deck.Add(new BuddyUp());
     deck.Add(new CECS100());
     deck.Add(new CECS105());
     deck.Add(new CECS174());
     deck.Add(new CHEM111());
     deck.Add(new ChoosingaMajor());
     deck.Add(new ElectiveClass());
     deck.Add(new ExcercisingMindandBody());
     deck.Add(new FallinthePond());
     deck.Add(new FindingtheLab());
     deck.Add(new GoodbyeProfessor());
     deck.Add(new LateforClass());
     deck.Add(new LearningLinux());
     deck.Add(new LearningNetbeans());
     deck.Add(new LearningtheRulesofSoccer());
     deck.Add(new LoudBuzzing());
     deck.Add(new LunchatBratwurstHall());
     deck.Add(new MakeaFriend());
     deck.Add(new MaketheDeansList());
     deck.Add(new Math122());
     deck.Add(new Math123());
     deck.Add(new MeettheDean());
     deck.Add(new OralCommunication());
     deck.Add(new ParkingViolation());
     deck.Add(new PassSoccerClass());
     deck.Add(new Physics151());
     deck.Add(new PresstheRightFloor());
     deck.Add(new ProfessorEnglert());
     deck.Add(new ProfessorHoffman());
     deck.Add(new ProgramCrashes());
     deck.Add(new ResearchCompilers());
     deck.Add(new ScoreaGoal());
     deck.Add(new SoccerGoalie());
     deck.Add(new StudentParking());
     deck.Add(new TheBigGame());
     deck.Add(new TheOutpost());
     Shuffle();
     PlayCardButton.Enabled = false;
     moveCount = 0;
     for (int i = 0; i < 5; i++)
     {
         playerArray[0].addCard(deck[deck.Count - 1]);
         deck.RemoveAt(deck.Count - 1);
     }
     showCard = deck[deck.Count - 1];
     deck.RemoveAt(deck.Count - 1);
     pictureBox2.ImageLocation = "C:\\Users\\adoni\\Documents\\Visual Studio 2015\\Projects\\CECS-343-project\\BS CS Challenge Game\\Resources\\" + showCard.getImage() + ".JPG";
     pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
     updatePointsDisplay();
     roomsList.Items.Clear();
     foreach (int s in roomArray[playerArray[0].getCurrentRoom()].getNextTo())
     {
         roomsList.Items.Add(roomArray[s].getRoomName());
     }
     roomArray[playerArray[0].getCurrentRoom()].MoveTo(playerArray[0].getPlayerName());
     roomArray[playerArray[1].getCurrentRoom()].MoveTo(playerArray[1].getPlayerName());
     roomArray[playerArray[2].getCurrentRoom()].MoveTo(playerArray[2].getPlayerName());
     PlayerIndicator.Text = "Human player is " + playerArray[0].getPlayerName();
 }