CS 355 - Systems Programming Course Project - Fall 2020
- Study chapters 5-7 of the textbook before starting any work on the project.
- This project is designed to be completed over a period of 2-3 weeks by a team of two students.
- Each student must have very clear roles and responsibilities in the project.
- At the very beginning of each function/code block, add a comment describing the primary author of that code and the main functionality declared/implemented.
- This project must utilize the curses or ncurses library for all visuals.
- Grading rubric (out of 20 pts):
- Indentation: 2
- Commenting: 3
- Variable/function naming: 3
- Snake movement/growth: 4
- Trophies: 4
- Overall gameplay: 4
- Write a C program snake that implements the classic snake game.
- The snake pit:
- The snake pit is the area where the snake can move.
- The snake pit must utilize all available space of the current terminal window.
- There must be a visible border delineating the snake pit.
- The snake:
- The initial length of the snake is three characters.
- Initial direction of the snake's movement is chosen randomly.
- The user can press one of the four arrow keys to change the direction of the snake's movement.
- The snake's speed is proportional to its length.
- The trophies:
- Trophies are represented by a digit randomly chosen from 1 to 9.
- There's always exactly one trophy in the snake pit at any given moment.
- When the snake eats the trophy, its length is increased by the corresponding number of characters.
- A trophy expires after a random interval from 1 to 9 seconds.
- A new trophy is shown at a random location on the screen after the previous one has either expired or is eaten by the snake.
- The gameplay:
- The snake dies and the game ends if:
- It runs into the border; or
- It runs into itself; or
- The user attempts to reverse the snake's direction.
- The user wins the game if the snake's length grows to the length equal to half the perimeter of the border.
- This project will have two milestones with different requirements:
- Intermediate deliverable (due 11/25/2020) needs to have the following functionality:
- The game starts with the snake of size 5 moving right;
- Snake movement can be controlled in all directions;
- Snake does not grow;
- Snake pit border is visible;
- No trophies.
- Final deliverable (due 12/07/2020):
- All functionality listed in "What to do?" section is required.
- For each deliverable you will need to submit the following:
- A single C source code file with your work.
- A video screencast showing a representative gameplay sequence. The video should be no longer than 3 minutes.