Sign In
Not register? Register Now!
Pages:
1 page/≈275 words
Sources:
2 Sources
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.

  1. Draw a bounding box to make a “playing field” out of ‘+’, ‘-’ and ‘|’ characters.
  2. Draw a “target” on the playing field out of ‘o’ characters.
  3. Draw a “person” on the playing field in the lower left hand corner.
  4. 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...
Updated on
Get the Whole Paper!
Not exactly what you need?
Do you need a custom essay? Order right now:

You Might Also Like Other Topics Related to art essays:

HIRE A WRITER FROM $11.95 / PAGE
ORDER WITH 15% DISCOUNT!