Essay Available:
page:
1 pages/≈275 words
Sources:
2
Style:
APA
Subject:
IT & Computer Science
Type:
Coursework
Language:
English (U.S.)
Document:
MS Word
Date:
Total cost:
$ 6.48
Topic:
Creating Game With ASCII Art
Coursework Instructions:
Description and Functional Requirements
For this program, you’ll implement a game where the player tries to hit a “target” with a “ball”. The game is all done with ASCII art.
- Draw a bounding box to make a “playing field” out of ‘+’, ‘-’ and ‘|’ characters.
- Draw a “target” on the playing field out of ‘o’ characters.
- Draw a “person” on the playing field in the lower left hand corner.
- Prompt the user for a velocity and angle:
Coursework Sample Content Preview:
C PROGRAM.
Student's Name
Institutional Affiliation
Course Code and Title
Instructor's Details
Assignment Due Date
#include
#include
#include
#include
#define G 9.8
void draw_bounding_box(int width, int height) {
int i, j;
for (i = 0; i < height; i++) {
for (j = 0; j < width; j++) {
if (i == 0 || i == height - 1) {
printf("-");
} else if (j == 0 || j == width - 1) {
printf("|");
} else {
printf(" ");
}
}
printf("\n");
}
}
void draw_target(int size, int x, int y) {
int i, j;
for (i = y; i < y + size; i++) {
for (j = x; j < x + size; j++) {
printf("o");
}
printf("\n");
}
}
void draw_person(int x, int y) {
printf("\\o/\n |\n/ \\");
}
void play_game(int width, int height) {
double v...
Get the Whole Paper!
Not exactly what you need?
Do you need a custom essay? Order right now:
👀 Other Visitors are Viewing These APA Essay Samples:
-
Deploy Security Measures Using Group Policy
2 pages/≈550 words | 2 Sources | APA | IT & Computer Science | Coursework |
-
Establishing Local Domain and Applications
2 pages/≈550 words | 2 Sources | APA | IT & Computer Science | Coursework |
-
Information Security Taxonomy and Secure Communications System
3 pages/≈825 words | 4 Sources | APA | IT & Computer Science | Coursework |