static void Main(string[] args) { Player player1 = new CreativeSmackTalkingPlayer(); player1.Name = "Bob"; Player player2 = new HumanPlayer(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); Player player3 = new OneHigherPlayer(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); Player player4 = new SoreLoserPlayer(); player4.Name = "Chad"; Player player5 = new UpperHalfPlayer(); player5.Name = "Steve"; Player player6 = new SoreLoserUpperHalfPlayer(); player6.Name = "Jeff"; player4.Play(player1); player5.Play(player2); player6.Play(player2); List <Player> players = new List <Player>() { player1, player2, player3, player4, player5, player6, large }; PlayMany(players); }
static void Main(string[] args) { Player player1 = new Player(); player1.Name = "Bob"; Player player2 = new Player(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); Player player3 = new Player(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; large.Play(player3); Console.WriteLine("-------------------"); Player smackTalker = new SmackTalkingPlayer(); smackTalker.Name = "Punk"; smackTalker.Play(large); Console.WriteLine("-------------------"); Player oneHigher = new OneHigherPlayer(); oneHigher.Name = "OneUpper"; oneHigher.Play(smackTalker); Console.WriteLine("-------------------"); Player hooman = new HumanPlayer(); hooman.Name = "Earthling"; hooman.Play(oneHigher); Console.WriteLine("-------------------"); Player creativeSmackTalker = new CreativeSmackTalkingPlayer(); creativeSmackTalker.Name = "ArtisticPunk"; creativeSmackTalker.Play(hooman); Console.WriteLine("-------------------"); Player todd = new SoreLoserPlayer(); todd.Name = "Todd"; todd.Play(creativeSmackTalker); Console.WriteLine("-------------------"); Player smug = new UpperHalfPlayer(); smug.Name = "McGee"; smug.Play(todd); Console.WriteLine("-------------------"); Player worst = new SoreLoserUpperHalfPlayer(); worst.Name = "The Worst"; worst.Play(player1); List <Player> players = new List <Player>() { player1, player2, player3, large, smackTalker, oneHigher, hooman, creativeSmackTalker, todd, smug, worst }; PlayMany(players); }
static void Main(string[] args) { Player player1 = new Player(); player1.Name = "Bob"; Player player2 = new Player(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); Player player3 = new Player(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); // Smack talking player SmackTalkingPlayer smackTalking = new SmackTalkingPlayer(); smackTalking.Name = "Rick James"; smackTalking.AddInsult("My dog rolls better than that!"); large.Play(smackTalking); Console.WriteLine("-------------------"); // One higher player Player oneHigher = new OneHigherPlayer(); oneHigher.Name = "Slick Rick"; oneHigher.Play(large); Console.WriteLine("-------------------"); // Human Player Player human = new HumanPlayer(); human.Name = "Ricky"; player1.Play(human); Console.WriteLine("-------------------"); // Creative Smack Talking Player Player creativeSmack = new CreativeSmackTalkingPlayer(); creativeSmack.Name = "Rick Roll"; large.Play(creativeSmack); Console.WriteLine("-------------------"); // Sore Loser Player Player soreLoser = new SoreLoserPlayer(); soreLoser.Name = "Ricky Williams"; // Try/Catch to handle exception message when SoreLoserPlayer loses try { soreLoser.Play(player2); } catch (Exception ex) { Console.WriteLine($"{soreLoser.Name} says: You Cheated!"); } Console.WriteLine("-------------------"); // Upper Half Player Player upperHalf = new UpperHalfPlayer(); upperHalf.Name = "Rick Grimes"; upperHalf.Play(player3); Console.WriteLine("-------------------"); // Sore Loser Upper Half Player Player sluhPlayer = new SoreLoserPlayer(); sluhPlayer.Name = "Rick Sanchez"; // Try/Catch to handle exception message when SoreLoserUpperHalfPlayer loses try { sluhPlayer.Play(large); } catch (Exception ex) { Console.WriteLine($"{sluhPlayer.Name} says: This game is rigged!"); } Console.WriteLine("-------------------"); List <Player> players = new List <Player>() { player1, player2, player3, large, smackTalking, oneHigher, human, creativeSmack, upperHalf }; PlayMany(players); }
static void Main(string [] args) { SmackTalkingPlayer player1 = new SmackTalkingPlayer(); player1.Name = "Chad"; OneHigherPlayer player2 = new OneHigherPlayer(); player2.Name = "Rob"; player2.Play(player1); Console.WriteLine("-------------------"); HumanPlayer player3 = new HumanPlayer(); player3.Name = "Todd"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Napoleon the SMALL"; player1.Play(large); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer player4 = new CreativeSmackTalkingPlayer(); player4.Name = "Dan"; player4.Play(large); Console.WriteLine("-------------------"); SoreLoserPlayer player5 = new SoreLoserPlayer(); player5.Name = "Greg"; player5.Play(player4); Console.WriteLine("-------------------"); UpperHalfPlayer player6 = new UpperHalfPlayer(); player6.Name = "Kris"; player6.Play(player4); Console.WriteLine("-------------------"); List <Player> players = new List <Player> () { player1, player2, player3, player4, player5, player6, large }; PlayMany(players); }
static void Main(string[] args) { SmackTalkingPlayer player1 = new SmackTalkingPlayer(); player1.Name = "Caitlin"; OneHigherPlayer player2 = new OneHigherPlayer(); player2.Name = "Joe"; player2.Play(player1); Console.WriteLine("-------------------"); HumanPlayer player3 = new HumanPlayer(); player3.Name = "Barry"; player3.Play(player2); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer player4 = new CreativeSmackTalkingPlayer(); player4.Name = "Cisco"; player4.Play(player3); Console.WriteLine("-------------------"); SoreLoserPlayer player5 = new SoreLoserPlayer(); player5.Name = "Henry"; // this is the try/catch to catch the Exception try { player5.Play(player4); } catch { Console.Write("you cheated"); } Console.WriteLine("-------------------"); UpperHalfPlayer player6 = new UpperHalfPlayer(); player6.Name = "Iris"; player6.Play(player5); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer player7 = new SoreLoserUpperHalfPlayer(); player7.Name = "Cecile"; // this is the try/catch to catch the Exception try { player7.Play(player6); } catch { Console.Write("You read my mind"); } Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); List <Player> players = new List <Player>() { player1, player2, player3, player4, player5, player6, player7, large }; PlayMany(players); }
static void Main(string[] args) { Player player1 = new Player(); player1.Name = "Bob"; Player player2 = new Player(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); Player player3 = new Player(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); SmackTalkingPlayer mackthesmack = new SmackTalkingPlayer(); mackthesmack.Name = "Mack"; mackthesmack.Taunt = "You're a loser who always loses."; mackthesmack.Play(player2); Console.WriteLine("-------------------"); OneHigherPlayer highBall = new OneHigherPlayer(); highBall.Name = "Willie"; highBall.Play(player3); Console.WriteLine("-------------------"); HumanPlayer dumbmortal = new HumanPlayer(); dumbmortal.Name = "BillyBob"; dumbmortal.Play(large); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer Mack2 = new CreativeSmackTalkingPlayer(); Mack2.Name = "Mackie"; Mack2.Play(player1); Console.WriteLine("-------------------"); SoreLoserPlayer sadBoi = new SoreLoserPlayer(); sadBoi.Name = "Brandon"; sadBoi.Play(player2); Console.WriteLine("-------------------"); UpperHalfPlayer cheater = new UpperHalfPlayer(); cheater.Name = "Andy"; cheater.Play(player2); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer grumpiBoi = new SoreLoserUpperHalfPlayer(); grumpiBoi.Name = "YoMomma"; grumpiBoi.Taunt = "You suck."; grumpiBoi.Play(player2); Console.WriteLine("-------------------"); List <Player> players = new List <Player>() { player1, player2, player3, large, mackthesmack, highBall, dumbmortal, sadBoi, cheater, grumpiBoi }; PlayMany(players); }
static void Main(string[] args) { Player player1 = new Player(); player1.Name = "Bob"; Player player2 = new Player(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); Player player3 = new Player(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); SmackTalkingPlayer person = new SmackTalkingPlayer(); person.Name = "Person"; person.Taunt = "this are mean words"; person.Play(player2); Console.WriteLine("-------------------"); OneHigherPlayer winner = new OneHigherPlayer(); winner.Name = "Winner"; winner.Play(player1); Console.WriteLine("-------------------"); HumanPlayer human = new HumanPlayer(); human.Play(player3); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer creative = new CreativeSmackTalkingPlayer(); creative.Name = "meanPerson"; creative.Play(player1); Console.WriteLine("-------------------"); SoreLoserPlayer sore = new SoreLoserPlayer(); sore.Name = "Sore Loser Player"; sore.Play(player3); Console.WriteLine("-------------------"); UpperHalfPlayer upper = new UpperHalfPlayer(); upper.Name = "Upper"; upper.Play(player3); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer soreAndUpper = new SoreLoserUpperHalfPlayer(); soreAndUpper.Name = "Sore and Upper"; soreAndUpper.Play(player2); List <Player> players = new List <Player>() { player1, player2, player3, large, winner, human, sore, upper, soreAndUpper }; PlayMany(players); }
static void Main(string[] args) { Player player1 = new Player(); player1.Name = "Bob"; SmackTalkingPlayer smackTalker = new SmackTalkingPlayer(); smackTalker.Name = "Sue Smacktalker"; OneHigherPlayer oneHigher = new OneHigherPlayer(); oneHigher.Name = "Wilma Onehigher"; LargeDicePlayer large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; HumanPlayer human = new HumanPlayer(); human.Name = "Henry Human"; CreativeSmackTalkingPlayer creative = new CreativeSmackTalkingPlayer(); creative.Name = "Creative Conan"; SoreLoserPlayer sore = new SoreLoserPlayer(); sore.Name = "Sally Soreloser"; UpperHalfPlayer upper = new UpperHalfPlayer(); upper.Name = "Uffie Upperhalf"; SoreLoserUpperHalfPlayer soreUpper = new SoreLoserUpperHalfPlayer(); soreUpper.Name = "Stephen Soreupper"; smackTalker.Play(player1); Console.WriteLine("-------------------"); oneHigher.Play(player1); Console.WriteLine("-------------------"); large.Play(smackTalker); Console.WriteLine("-------------------"); human.Play(player1); Console.WriteLine("-------------------"); creative.Play(smackTalker); Console.WriteLine("-------------------"); sore.Play(player1); Console.WriteLine("-------------------"); upper.Play(player1); Console.WriteLine("-------------------"); soreUpper.Play(player1); Console.WriteLine("-------------------"); List <Player> players = new List <Player>() { player1, smackTalker, oneHigher, large, human, creative, upper, sore, soreUpper }; PlayMany(players); }
static void Main(string[] args) { SmackTalkingPlayer Buba = new SmackTalkingPlayer(); Buba.Name = "Bubba"; Buba.Taunt = "BOOOOOO!!!!"; SmackTalkingPlayer Bobly = new SmackTalkingPlayer(); Bobly.Name = "Bobbily"; UpperHalfPlayer pierre = new UpperHalfPlayer(); pierre.Name = "Pierre Artoise"; pierre.Play(Buba); OneHigherPlayer lucky = new OneHigherPlayer(); lucky.Name = "Lucky MacDucky"; lucky.Play(Buba); CreativeSmackTalkingPlayer Frenchie = new CreativeSmackTalkingPlayer(); Frenchie.Name = "Hercule"; Frenchie.Taunt = Frenchie.SelectTaunt(); Frenchie.Play(Buba); HumanPlayer user1 = new HumanPlayer(); Console.Write("What's your name? "); user1.Name = Console.ReadLine(); Bobly.Play(user1); SoreLoserPlayer steve = new SoreLoserPlayer(); steve.Name = "steve"; SoreLoserUpperHalfPlayer stephan = new SoreLoserUpperHalfPlayer(); stephan.Name = "stephan Artoise"; stephan.Play(Bobly); steve.Play(Frenchie); Player player1 = new Player(); player1.Name = "Bob"; Player player2 = new Player(); player2.Name = "Sue"; player2.Play(player1); Buba.Play(player1); Console.WriteLine("-------------------"); Player player3 = new Player(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); stephan.Play(user1); List <Player> players = new List <Player>() { player1, player2, player3, Buba, Bobly, large }; PlayMany(players); }
static void Main(string[] args) { // instantiating new players SmackTalkingPlayer player1 = new SmackTalkingPlayer(); player1.Name = "Smack Talker"; OneHigherPlayer player2 = new OneHigherPlayer(); player2.Name = "One Higher"; player2.Play(player1); Console.WriteLine("-------------------"); HumanPlayer player3 = new HumanPlayer(); player3.Name = "Human"; player3.Play(player2); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer player4 = new CreativeSmackTalkingPlayer(); player4.Name = "Creative Smack Talker"; player4.Play(player3); Console.WriteLine("-------------------"); SoreLoserPlayer player5 = new SoreLoserPlayer(); player5.Name = "Sore Loser Player"; // catching the exception try { player5.Play(player4); } catch { Console.WriteLine($"You cheated!"); } Console.WriteLine("-------------------"); UpperHalfPlayer player6 = new UpperHalfPlayer(); player6.Name = "Upper Half Player"; player6.Play(player5); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer player7 = new SoreLoserUpperHalfPlayer(); player7.Name = "Sore Loser Upper Half Player"; // catching the exception try { player7.Play(player6); } catch { Console.WriteLine($"You cheated!"); } Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); // creating a list of players List <Player> players = new List <Player>() { player1, player2, player3, player4, player5, player6, player7, large }; PlayMany(players); }
static void Main(string[] args) { Player player1 = new Player(); player1.Name = "Bob"; Player player2 = new Player(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); Player player3 = new Player(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; large.Play(player3); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer smackTalkPlayer = new CreativeSmackTalkingPlayer(); smackTalkPlayer.Name = "badmouth mcgee"; smackTalkPlayer.Play(player3); Console.WriteLine("-------------------"); OneHigherPlayer higherPlayer = new OneHigherPlayer(); higherPlayer.Name = "vanquisher"; higherPlayer.Play(player3); Console.WriteLine("-------------------"); HumanPlayer u = new HumanPlayer(); u.Name = "You"; u.Play(player3); Console.WriteLine("-------------------"); SmackTalkingPlayer smack = new SmackTalkingPlayer(); smack.Name = "smacky"; smack.Taunt = "About to win me a new pair of shoes"; smack.Play(player1); Console.WriteLine("-------------------"); SoreLoserPlayer Loser = new SoreLoserPlayer(); Loser.Name = "wack"; Loser.Play(player1); Console.WriteLine("-------------------"); UpperHalfPlayer Upper = new UpperHalfPlayer(); Upper.Name = "Up"; Upper.Play(player3); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer bigWack = new SoreLoserUpperHalfPlayer(); bigWack.Name = "biggerWack"; bigWack.Play(player3); Console.WriteLine("-------------------"); List <Player> players = new List <Player>() { player1, player2, player3, large, smackTalkPlayer, higherPlayer, smack, Loser, Upper, bigWack, u }; PlayMany(players); }
static void Main(string[] args) { SmackTalkingPlayer player1 = new SmackTalkingPlayer(); player1.Name = "Bob"; //player1.Taunt = "Hey... They Call me Robert Paulsen and you are a LOOOOSSSSEEERRRR"; OneHigherPlayer player2 = new OneHigherPlayer(); player2.Name = "Sue"; player1.Play(player2); Console.WriteLine("-------------------"); HumanPlayer player3 = new HumanPlayer(); player3.Name = "Bert"; player3.Play(player1); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer player4 = new CreativeSmackTalkingPlayer(); player4.Name = "Jimbo"; Player player5 = new Player(); player5.Name = "Drew"; player4.Play(player5); Console.WriteLine("-------------------"); LargeDicePlayer large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); UpperHalfPlayer player6 = new UpperHalfPlayer(); player6.Name = "The Dude"; Player player7 = new Player(); player7.Name = "Other Guy"; player6.Play(player7); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer player8 = new SoreLoserUpperHalfPlayer(); player8.Name = "Sad Panda but with Bamboo"; SoreLoserPlayer player9 = new SoreLoserPlayer(); player9.Name = "Sad Panda"; List <Player> players = new List <Player>() { player1, player2, player3, player4, player5, player6, player7, player8, player9, large }; PlayMany(players); }
static void Main(string[] args) { // DWB update SmackTalkingPlayer player1 = new SmackTalkingPlayer(); player1.Name = "Bob"; OneHigherPlayer player2 = new OneHigherPlayer(); player2.Name = "Sue"; player2.Play(player1); Console.WriteLine("-------------------"); HumanPlayer player3 = new HumanPlayer(); player3.Name = "Human Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer smartass = new CreativeSmackTalkingPlayer(); smartass.Name = "Smartass Sal"; smartass.Play(large); Console.WriteLine("-------------------"); SoreLoserPlayer exceptional = new SoreLoserPlayer(); exceptional.Name = "SoreLoser Exceptional Ed"; exceptional.Play(player1); Console.WriteLine("-------------------"); UpperHalfPlayer upperPlayer = new UpperHalfPlayer(); upperPlayer.Name = "UpperHalf Hal"; upperPlayer.Play(large); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer soreUpper = new SoreLoserUpperHalfPlayer(); soreUpper.Name = "UpperHalf Hater"; soreUpper.Play(large); Console.WriteLine("-------------------"); HumanPlayer moreHumanThanHuman = new HumanPlayer(); moreHumanThanHuman.Name = "Human Uberman Neitzsche"; moreHumanThanHuman.Play(player3); Console.WriteLine("Object Type:"); Console.WriteLine(moreHumanThanHuman.GetType().Equals(typeof(HumanPlayer))); Console.WriteLine("-------------------"); List <Player> players = new List <Player>() { player1, player2, player3, large, smartass, exceptional, upperPlayer, soreUpper, moreHumanThanHuman }; PlayMany(players); }
static void Main(string[] args) { Console.WriteLine("-------------------"); SmackTalkingPlayer player1 = new SmackTalkingPlayer(); player1.Name = "Smack"; HumanPlayer human = new HumanPlayer(); human.Name = "human"; human.Play(player1); Console.WriteLine("-------------------"); SoreLoserPlayer playerSore = new SoreLoserPlayer(); playerSore.Name = "Sore Loser"; CreativeSmackTalkingPlayer playerSmack = new CreativeSmackTalkingPlayer(); playerSmack.Name = "Creative Smack"; playerSore.Play(playerSmack); Console.WriteLine("-------------------"); Console.WriteLine("-------------------"); UpperHalfPlayer upperHalfPlayer = new UpperHalfPlayer(); upperHalfPlayer.Name = "Upper Half Player"; upperHalfPlayer.Play(playerSmack); Console.WriteLine("-------------------"); CreativeSmackTalkingPlayer player2 = new CreativeSmackTalkingPlayer(); player2.Name = "Creative Smack"; player2.Play(player1); Console.WriteLine("-------------------"); OneHigherPlayer player3 = new OneHigherPlayer(); player3.Name = "Wilma"; player3.Play(player2); Console.WriteLine("-------------------"); Player large = new LargeDicePlayer(); large.Name = "Bigun Rollsalot"; player1.Play(large); Console.WriteLine("-------------------"); SoreLoserUpperHalfPlayer soreUpper = new SoreLoserUpperHalfPlayer(); soreUpper.Play(player1); soreUpper.Name = "sore Upper"; List <Player> players = new List <Player>() { player1, player2, player3, large, human, playerSmack, playerSore, upperHalfPlayer, soreUpper }; PlayMany(players); }