No description
  • Ruby 29.9%
  • C 27.6%
  • PHP 25.7%
  • Python 16.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-04-18 18:01:09 -04:00
c added writeup jnc 2018-04-18 18:01:09 -04:00
php Add files via upload 2018-04-17 16:00:15 -04:00
python Remove unused imports 2018-04-18 15:06:52 -04:00
ruby fixed oversized box 2018-04-17 22:18:26 -04:00
example_out.txt Update output example 2018-04-16 13:21:08 -04:00
instructions.txt Update instructions to work CORRECTLY. 2018-04-16 12:39:37 -04:00
README.md added due date time 2018-04-17 22:40:28 -04:00

CPSC 4100 - Group 5 Project - Due 4/18/2018 @midnight

TODO

  • We need all of the submissions.
  • We need each member to submit their page to the report located here.
  • We need to write the conclusion portion of the paper, recommending a specific language.

TODO - Resolved.

Report - Google Docs

Each group is responsible for turning in a single PDF file containing the following items:

  1. One overview page describing their problem and listing the languages used.
  2. Approximately one or two pages per language, describing the language and approach to solving the problem. Include the following items:
  • What distinguishes this language from the others used
  • What were any perceived benefits or problems experienced using this language for the solution.
  1. In conclusion, a supported recommendation for what language to use for this and similar problems.
  2. An appendix, organized by language, containing all source code and screenshots of the programs running.

Assignment

Each team member must submit a solution in a different programming language. The output and functionality of each program must match.

Your program will read in a sequence of “instructions” and generate an output text containing ascii art described by these instructions. You get to decide on the complexity of the output art and the functionality of the instructions, but all programs must be able to process the same input.

You must be able to at least draw vertical and horizontal straight lines, and fill closed regions with a given text character.

Languages

  • Joshua Freeman - C
  • Jose Stovall - Python (Done)
  • Colby Myers
  • Aaron Boggs - Ruby (Done)
  • Nicholas Haymore - PHP (Done)

Instructions

These are read-in from a text-file in the root of this repository: instructions.txt. Each of our programs should read from this file and produce their output. We support the following instructions:

NOTE! Some of the instructions have outstanding TODOs, please reference the top of this README for more information.

Invalid instructions

Any invalid instructions, or instructions that result in invalid operations are simply noop'd. That is, they do not halt the program, but instead fail silently - letting further instructions continue.

Example: draw_horizontal_line -10, -100, 40

Board

Currently hardcoded to be 32x32 size. Prefilled with a character of (space).

draw_horizontal_line

Sets characters on board to - draw_hoizontal_line, x_cord, y_cord, length

draw_vertical_line

Sets characters on board to | draw_vertical_line, x_cord, y_cord, length

draw_diagonal_line

Sets characters on board to \ for direction==right Sets characters on board to / for direction==left draw_diagonal_line, x_cord, y_cord, length, direction

fill

Sets characters on board to the first character of string. We are using a simple flood-fill algorithm to implement this feature, here is a good reference. fill, x_cord, y_cord, string

It's worth noting that this fill command should be able to take in a string of any length and only get the first character of that string (meaning if it's a string of length 1, we're good, but if someone types in "@%&#^", then only @ is printed)

draw_empty_box

Draws a box-like shape on the board with # characters. The center of the box is not filled in with any character. draw_empty_box, x_cord, y_cord, width, height

Example Output

There is a text-file, example_out.txt in the root of this repository which we can compare each other's output against. There are several online tools you can use to easily compare your output vs. our group's expected output:

Or linux command line: diff output1 output2