MeKot / simple-tetris-engine

Simple Tetris simulation I completed as an assignment during an interview process

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simple-tetris-engine

Simulates a simplified version of tetris based on command line input. This was completed as a take home assignment for a company as part of their interview process.


Tech stack

  • Written in Java 8 using Intellij
  • Tested via Spock & Groovy (the only external libraries used)
  • Version control managed with Git
  • Dependencies managed and artifacts built using Gradle
    • The Gradle wrapper is used so it is not necessary for you to have Gradle installed on your machine

Building & running

Building a JAR

To build an executable JAR from the root of the project use:

./gradlew jar

The resulting JAR file will be located in the build/libs directory.

Running the JAR

The executable JAR that is generated is expected to be run in the following way:

java -jar simple-tetris-engine.jar <input-file-path> <output-file-path>

Running tests

To run all tests from the root of the project use:

./gradlew check

Adding shapes

Adding a new shape to the application should only require adding another enum value to the Shape class with the correct dimensions. The tests for parsing values from the command line are dynamic so rerunning tests will test whether or not your new shape can be parsed from the command line properly.

About

Simple Tetris simulation I completed as an assignment during an interview process


Languages

Language:Java 59.2%Language:Groovy 37.6%Language:Kotlin 3.3%