Create a game called Sheep Herder. The idea of the game is to herd the sheep (find) before the sheep are eaten. Simply

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Create a game called Sheep Herder. The idea of the game is to herd the sheep (find) before the sheep are eaten. Simply

Post by answerhappygod »

Create a game called Sheep Herder. The idea of the game isto herd the sheep (find) before the sheep are eaten. Simplyput, the user chooses spots in a grid and if it is a sheep, thesheep was herded. In the game there will also be a dog and awolf. If found, the dog will help in two ways: 1. Givethe user an extra turn. 2. Fight the wolf if the wolf attacks you. If found, the wolf will attack you and you will lose unlessyou already found the dog. All animals have a randomstrength value (str). This will come in to play when the dogdefends you from the wolf or the wolf bumps into the dog. Saythe Dog str = 10 and the wolf’s str = 8. Well your dog wouldwin and survive with only 2 left over and the poor wolf dies. But what if it was vise versa? Your dog would havedied and the wolf survives with str = 2. But happily youstill survive in either scenario. Now the game startsand the computer creates a 5x5 grid and randomly chooses acoordinate to put the sheep, dog and wolf. Normally the usercannot see where they are but for this assignment I want to be ableto see all of them for testing purposes. Make it similar tothe example provided below. In each turn the user gets tochoose a coordinate and then the wolf moves. You get todecide how smart that wolf is. Does it move by smell orrandom? But if that wolf hits the sheep, the sheep is no moreand the game ends. The game has to be similar to what I saidbut you can change it up to make it better if you wish. If Isee a smart wolf (AI) you would get better marks… Lastly addlevels. Be sure to use JOptionPane, Switches, Loops,StringBuilder, and arrays. There should be at leastthree classes created. I created six classes to create thisgame (SheepHerder.java, Player.java, Grid.java, Coordinate.java,Call.java and Animal.java). Make it user friendly with asmart AI and OOP (meaning almost no code in the mainmethod)!
example outputs
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply