Question
C# windows application Define a board, say 50X50 and display a number of each animal (including hunters) in the board (you can use image files
C# windows application
Define a board, say 50X50 and display a number of each animal (including hunters) in the board (you can use image files to display each animal: cricket, frog, bird, mouse, snake and hunter in the board) and provide a set of buttons for the user to control each iteration. During each iteration, each animal will move, after the new positions for all animals are set, the lucky ones (have food close by) will eat, the unlucky ones will be eaten or killed. Make sure that two animals do not sit in the same square. Allow the user to set parameters (like, number of each kind of animal, how close food needs to be in order to eat it, etc.) either via menus, buttons, drop down boxes or whatever GUI control you find appropriate. It should be a fun assignment in which you have to use inheritance, and polymorphism as well as some of the GUI facilities of .NET. Document any assumptions you make (e.g., hunter can kill only neighboring snakes but can kill birds up to N locations away)
You can use a timer to advance the game (say animals move every X seconds, for example) and provide a next button that will trigger movement from all the animals with the possibility to flip between manual movements using the next button and automated movements using the timer.
Limit movements to prevent animals to move off the board and re-enter on the other side. E.g., if an animal is in a square on the first row, it can only move left, right or down, but not up.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started