Programming Assignment 2 In the assignment you are to build the game 'Snake'. The game environment is as follows: · The playing space is a 2-dimensional window. It may or may not contain objects that...

1 answer below »
Snake programming


Programming Assignment 2 In the assignment you are to build the game 'Snake'.  The game environment is as follows: · The playing space is a 2-dimensional window. It may or may not contain objects that act as barriers. · The 'snake' initially comprises a single rectangular block. As the game progresses, additional blocks are added to the tail of the snake.  So the snake gets longer as the game progresses (see the next point). · When the snake encounters an object, a barrier or one of the window edges it does two things: . it grows another block . it turns randomly, left, right, or doubles back on itself. . alternatively the snake can continue moving in the same direction reappearing on the opposite side of the window · Each time the snake grows a new block its speed increases by 5% · The user can control the direction of the snake by using arrow keys · The game is over if one part of the snake crosses over itself. Your task is to implement the game. Here's how you win at completing Cooper assignments 1. Meeting the requirements of the assignment. 70% of the grade 2. Internal program documentation.  10% of the grade 3. Appropriately professional code structure and organization. 10% of the grade 4. doing 'something' above and beyond. 10% of the grade Here's how you lose at completing Cooper assignments 1. Failing to use appropriate features of your programming language of choice. -5% 2. Submitting code embedded in a .docx, .pdf, .rar, or any other file format unrelated to programming assignments. -5% 3. Failing to submit evidence that the code compiles, executes, and meets the assignment requirements. -5% Something above and beyond There are myriad ways to add to the functionality of the game.  Here are a few but feel free to come up with novel ideas yourself: · make the game (and the snake) three-dimensional · provide a scoring mechanism such as a timer or points total based on the length of the snake · allow the user to add or remove barriers · add more snakes and make each snake eat the tails of other snakes if they collide.  This might be user-controlled or a function of one snake getting too large. · provide food for the snake to make it grow
Answered Same DayFeb 24, 2021

Answer To: Programming Assignment 2 In the assignment you are to build the game 'Snake'. The game environment...

Neha answered on Feb 24 2021
144 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Submit New Assignment

Copy and Paste Your Assignment Here