From 54a64b644b7cf52e654ea90ef3ca4de7a7f2f13f Mon Sep 17 00:00:00 2001 From: Matt Decker Date: Sun, 26 Jun 2022 08:53:46 -0500 Subject: [PATCH] Delete Groovy directory --- Groovy/.gitignore | 124 ------------------ Groovy/.idea/compiler.xml | 22 ---- Groovy/.idea/copyright/profiles_settings.xml | 3 - Groovy/.idea/misc.xml | 26 ---- Groovy/.idea/modules.xml | 8 -- Groovy/Groovy.iml | 12 -- Groovy/README.txt | 17 --- Groovy/src/com/gildedrose/GildedRose.groovy | 62 --------- .../src/com/gildedrose/GildedRoseTest.groovy | 15 --- Groovy/src/com/gildedrose/Item.groovy | 21 --- .../src/com/gildedrose/TexttestFixture.groovy | 32 ----- 11 files changed, 342 deletions(-) delete mode 100644 Groovy/.gitignore delete mode 100644 Groovy/.idea/compiler.xml delete mode 100644 Groovy/.idea/copyright/profiles_settings.xml delete mode 100644 Groovy/.idea/misc.xml delete mode 100644 Groovy/.idea/modules.xml delete mode 100644 Groovy/Groovy.iml delete mode 100644 Groovy/README.txt delete mode 100644 Groovy/src/com/gildedrose/GildedRose.groovy delete mode 100644 Groovy/src/com/gildedrose/GildedRoseTest.groovy delete mode 100644 Groovy/src/com/gildedrose/Item.groovy delete mode 100644 Groovy/src/com/gildedrose/TexttestFixture.groovy diff --git a/Groovy/.gitignore b/Groovy/.gitignore deleted file mode 100644 index 8f0aaba4..00000000 --- a/Groovy/.gitignore +++ /dev/null @@ -1,124 +0,0 @@ - -# Created by https://www.gitignore.io/api/groovy,intellij,eclipse,vim - -#!! ERROR: groovy is undefined. Use list command to see defined gitignore types !!# - -### Intellij ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff: -.idea/workspace.xml -.idea/tasks.xml -.idea/dictionaries -.idea/vcs.xml -.idea/jsLibraryMappings.xml - -# Sensitive or high-churn files: -.idea/dataSources.ids -.idea/dataSources.xml -.idea/dataSources.local.xml -.idea/sqlDataSources.xml -.idea/dynamic.xml -.idea/uiDesigner.xml - -# Gradle: -.idea/gradle.xml -.idea/libraries - -# Mongo Explorer plugin: -.idea/mongoSettings.xml - -## File-based project format: -*.iws - -## Plugin-specific files: - -# IntelliJ -/out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -### Intellij Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml - - -### Eclipse ### - -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.settings/ -.loadpath -.recommenders - -# Eclipse Core -.project - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# PyDev specific (Python IDE for Eclipse) -*.pydevproject - -# CDT-specific (C/C++ Development Tooling) -.cproject - -# JDT-specific (Eclipse Java Development Tools) -.classpath - -# Java annotation processor (APT) -.factorypath - -# PDT-specific (PHP Development Tools) -.buildpath - -# sbteclipse plugin -.target - -# Tern plugin -.tern-project - -# TeXlipse plugin -.texlipse - -# STS (Spring Tool Suite) -.springBeans - -# Code Recommenders -.recommenders/ - - -### Vim ### -# swap -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] -# session -Session.vim -# temporary -.netrwhist -*~ -# auto-generated tag files -tags - diff --git a/Groovy/.idea/compiler.xml b/Groovy/.idea/compiler.xml deleted file mode 100644 index 96cc43ef..00000000 --- a/Groovy/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Groovy/.idea/copyright/profiles_settings.xml b/Groovy/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf33..00000000 --- a/Groovy/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/Groovy/.idea/misc.xml b/Groovy/.idea/misc.xml deleted file mode 100644 index c6d8fb73..00000000 --- a/Groovy/.idea/misc.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Groovy/.idea/modules.xml b/Groovy/.idea/modules.xml deleted file mode 100644 index c1a39855..00000000 --- a/Groovy/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Groovy/Groovy.iml b/Groovy/Groovy.iml deleted file mode 100644 index 85bea791..00000000 --- a/Groovy/Groovy.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/Groovy/README.txt b/Groovy/README.txt deleted file mode 100644 index 664827d7..00000000 --- a/Groovy/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -Welcome to the Groovy Gilded Rose -================================= - -to run the test, you can either: -- run them from your favorite IDE - - make sure you have installed language support for Groovy - - IntelliJ: - - open project - - choose this folder (Groovy) - - Eclipse: - - new Groovy Project - - choose this folder (Groovy) as the project folder - - add JUnit to build path -- run the test from the src/ folder in your shell: - - $ cd src/ - - $ groovy com/gildedrose/GildedRoseTest.groovy - diff --git a/Groovy/src/com/gildedrose/GildedRose.groovy b/Groovy/src/com/gildedrose/GildedRose.groovy deleted file mode 100644 index ba054cb6..00000000 --- a/Groovy/src/com/gildedrose/GildedRose.groovy +++ /dev/null @@ -1,62 +0,0 @@ -package com.gildedrose - -class GildedRose { - Item[] items - - GildedRose(Item[] items) { - this.items = items - } - - void updateQuality() { - for (int i = 0; i < items.length; i++) { - if (!items[i].name.equals("Aged Brie") - && !items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) { - if (items[i].quality > 0) { - if (!items[i].name.equals("Sulfuras, Hand of Ragnaros")) { - items[i].quality = items[i].quality - 1 - } - } - } else { - if (items[i].quality < 50) { - items[i].quality = items[i].quality + 1 - - if (items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) { - if (items[i].sellIn < 11) { - if (items[i].quality < 50) { - items[i].quality = items[i].quality + 1 - } - } - - if (items[i].sellIn < 6) { - if (items[i].quality < 50) { - items[i].quality = items[i].quality + 1 - } - } - } - } - } - - if (!items[i].name.equals("Sulfuras, Hand of Ragnaros")) { - items[i].sellIn = items[i].sellIn - 1 - } - - if (items[i].sellIn < 0) { - if (!items[i].name.equals("Aged Brie")) { - if (!items[i].name.equals("Backstage passes to a TAFKAL80ETC concert")) { - if (items[i].quality > 0) { - if (!items[i].name.equals("Sulfuras, Hand of Ragnaros")) { - items[i].quality = items[i].quality - 1 - } - } - } else { - items[i].quality = items[i].quality - items[i].quality - } - } else { - if (items[i].quality < 50) { - items[i].quality = items[i].quality + 1 - } - } - } - } - } -} diff --git a/Groovy/src/com/gildedrose/GildedRoseTest.groovy b/Groovy/src/com/gildedrose/GildedRoseTest.groovy deleted file mode 100644 index d96202c0..00000000 --- a/Groovy/src/com/gildedrose/GildedRoseTest.groovy +++ /dev/null @@ -1,15 +0,0 @@ -package com.gildedrose - -import org.junit.Test - -class GildedRoseTest { - - @Test - void "foo"() { - def items = [ new Item("foo", 0, 0) ] as Item[] - def app = new GildedRose(items) - app.updateQuality() - assert "fixme" == app.items[0].name - } - -} diff --git a/Groovy/src/com/gildedrose/Item.groovy b/Groovy/src/com/gildedrose/Item.groovy deleted file mode 100644 index c42d6cea..00000000 --- a/Groovy/src/com/gildedrose/Item.groovy +++ /dev/null @@ -1,21 +0,0 @@ -package com.gildedrose - -class Item { - - String name - - int sellIn - - int quality - - Item(String name, int sellIn, int quality) { - this.name = name - this.sellIn = sellIn - this.quality = quality - } - - @Override - String toString() { - return this.name + ", " + this.sellIn + ", " + this.quality - } -} diff --git a/Groovy/src/com/gildedrose/TexttestFixture.groovy b/Groovy/src/com/gildedrose/TexttestFixture.groovy deleted file mode 100644 index 3c8b46e3..00000000 --- a/Groovy/src/com/gildedrose/TexttestFixture.groovy +++ /dev/null @@ -1,32 +0,0 @@ -package com.gildedrose - -println("OMGHAI!") - -Item[] items = [ - new Item("+5 Dexterity Vest", 10, 20), - new Item("Aged Brie", 2, 0), - new Item("Elixir of the Mongoose", 5, 7), - new Item("Sulfuras, Hand of Ragnaros", 0, 80), - new Item("Sulfuras, Hand of Ragnaros", -1, 80), - new Item("Backstage passes to a TAFKAL80ETC concert", 15, 20), - new Item("Backstage passes to a TAFKAL80ETC concert", 10, 49), - new Item("Backstage passes to a TAFKAL80ETC concert", 5, 49), - // this conjured item does not work properly yet - new Item("Conjured Mana Cake", 3, 6)] as Item[] - -GildedRose app = new GildedRose(items) - -int days = 2 -if (args.length > 0) { - days = Integer.parseInt(args[0]) + 1 -} - -for (int i = 0; i < days; i++) { - println("-------- day " + i + " --------") - println("name, sellIn, quality") - for (Item item in items) { - println(item) - } - println "" - app.updateQuality() -}