Giter Site home page Giter Site logo

comp30670-assignment3's Introduction

LIGHT TESTER

*** Program to count LED lights ***

GitHub Repository

Purpose

The Science Centre is installing a new display board which is constructed from LED lights. The board is a square grid of LEDs.

This program tests the lights by sending instructions to turn on, turn off, or switch various inclusive ranges given as coordinate pairs. These instructions will be read from a file and the program will determine how many lights are on after al the instructions have been applied.

Requirements

pytest

Installation

pip install -e .

TEST

Test can be executed by running the test.py file. py.test tests/test.py

Code will test for various things:

  • Existence of the input file
  • Check for errors in file, any commands which are not "turn on". "turn off" or "switch" should be ignored
  • If a command affects a region outside the area of hte grid, then it will still be executed, but only on the region of lights inside the boundary

RUN

In command line:

  • LEDCounter --input {file} *

Files to run:

  1. LEDCounter --input http://claritytrec.ucd.ie/~alawlor/comp30670/input_assign3.txt
  2. LEDCounter --input http://claritytrec.ucd.ie/~alawlor/comp30670/input_assign3_a.txt
  3. LEDCounter --input http://claritytrec.ucd.ie/~alawlor/comp30670/input_assign3_b.txt
  4. LEDCounter --input http://claritytrec.ucd.ie/~alawlor/comp30670/input_assign3_c.txt
  5. LEDCounter --input http://claritytrec.ucd.ie/~alawlor/comp30670/input_assign3_d.txt

comp30670-assignment3's People

Contributors

sar2901 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.