From 07395ecfd92723a0acf9ba9e26041d62ec6e04b1 Mon Sep 17 00:00:00 2001 From: Cezary Adamczak Date: Thu, 3 Jun 2021 16:06:34 +0200 Subject: [PATCH] Dodanie 'cases.py' --- cases.py | 259 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 cases.py diff --git a/cases.py b/cases.py new file mode 100644 index 0000000..0c3574b --- /dev/null +++ b/cases.py @@ -0,0 +1,259 @@ +class Case: + def __init__(self, values, attributes, Class): + self.values = values + self.attributes = attributes + self.Class = Class + +attributes = ["field.hydration", "field.fertility", "species", "ticks", "is_healthy", "field.tractor_there"] + +cases = [Case([4, 0, "potato", 0, 1, 0], attributes, 0), +Case([2, 0, "sorrel", 1, 1, 0], attributes, 1), +Case([4, 1, "wheat", 0, 0, 1], attributes, 0), +Case([1, 1, "potato", 1, 0, 1], attributes, 0), +Case([2, 1, "potato", 0, 0, 1], attributes, 0), +Case([2, 0, "potato", 0, 1, 0], attributes, 0), +Case([1, 1, "strawberry", 1, 0, 1], attributes, -1), +Case([1, 0, "wheat", 1, 1, 1], attributes, 0), +Case([2, 0, "wheat", 1, 0, 1], attributes, 0), +Case([1, 1, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 1, "potato", 1, 1, 0], attributes, 1), +Case([2, 1, "strawberry", 1, 0, 0], attributes, 0), +Case([4, 0, "wheat", 1, 1, 1], attributes, 0), +Case([4, 1, "wheat", 1, 0, 1], attributes, 0), +Case([5, 1, "potato", 1, 1, 1], attributes, 0), +Case([4, 0, "strawberry", 1, 0, 0], attributes, 0), +Case([1, 1, "sorrel", 1, 0, 0], attributes, 0), +Case([0, 0, "sorrel", 0, 0, 1], attributes, 0), +Case([2, 0, "sorrel", 1, 1, 0], attributes, 1), +Case([0, 1, "sorrel", 0, 1, 1], attributes, 0), +Case([0, 1, "strawberry", 1, 1, 0], attributes, -1), +Case([2, 0, "sorrel", 0, 1, 1], attributes, 0), +Case([4, 0, "wheat", 1, 0, 1], attributes, 0), +Case([5, 0, "wheat", 0, 0, 0], attributes, 0), +Case([0, 0, "strawberry", 1, 0, 0], attributes, -1), +Case([4, 0, "sorrel", 1, 0, 0], attributes, 0), +Case([3, 0, "sorrel", 0, 0, 1], attributes, 0), +Case([3, 1, "potato", 1, 0, 1], attributes, 0), +Case([4, 1, "potato", 0, 0, 1], attributes, 0), +Case([1, 1, "wheat", 0, 1, 1], attributes, 0), +Case([3, 0, "wheat", 0, 1, 1], attributes, 0), +Case([2, 0, "wheat", 0, 0, 0], attributes, 0), +Case([5, 1, "potato", 1, 1, 1], attributes, 0), +Case([4, 1, "strawberry", 0, 0, 1], attributes, 0), +Case([1, 0, "potato", 1, 1, 0], attributes, 0), +Case([4, 1, "sorrel", 1, 1, 1], attributes, 0), +Case([0, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([4, 0, "strawberry", 1, 0, 0], attributes, 0), +Case([4, 0, "sorrel", 1, 0, 0], attributes, 0), +Case([5, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 1, "wheat", 1, 1, 1], attributes, 0), +Case([3, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([4, 0, "potato", 0, 0, 1], attributes, 0), +Case([5, 1, "wheat", 1, 1, 1], attributes, 0), +Case([3, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 0, "sorrel", 0, 0, 1], attributes, 0), +Case([0, 0, "potato", 1, 1, 1], attributes, -1), +Case([4, 0, "strawberry", 1, 1, 1], attributes, 0), +Case([2, 1, "strawberry", 1, 0, 1], attributes, 0), +Case([2, 1, "wheat", 0, 0, 1], attributes, 0), +Case([2, 1, "sorrel", 1, 1, 0], attributes, 1), +Case([1, 0, "potato", 1, 0, 1], attributes, 0), +Case([4, 0, "strawberry", 1, 0, 0], attributes, 0), +Case([4, 1, "potato", 1, 1, 1], attributes, 0), +Case([0, 0, "strawberry", 1, 0, 1], attributes, -1), +Case([0, 1, "wheat", 0, 0, 0], attributes, 0), +Case([1, 1, "wheat", 0, 1, 0], attributes, 0), +Case([0, 0, "sorrel", 1, 1, 0], attributes, -1), +Case([2, 0, "sorrel", 0, 0, 1], attributes, 0), +Case([5, 1, "wheat", 1, 1, 1], attributes, 0), +Case([2, 0, "strawberry", 0, 1, 0], attributes, 0), +Case([2, 1, "wheat", 0, 0, 1], attributes, 0), +Case([3, 0, "potato", 1, 0, 1], attributes, 0), +Case([5, 0, "wheat", 1, 1, 1], attributes, 0), +Case([0, 1, "strawberry", 1, 0, 0], attributes, -1), +Case([0, 0, "wheat", 0, 0, 0], attributes, 0), +Case([5, 0, "potato", 1, 1, 0], attributes, 1), +Case([2, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 1, "sorrel", 0, 1, 0], attributes, 0), +Case([2, 1, "potato", 1, 1, 1], attributes, 0), +Case([5, 0, "strawberry", 1, 1, 0], attributes, 1), +Case([5, 0, "wheat", 0, 0, 0], attributes, 0), +Case([5, 0, "wheat", 1, 1, 0], attributes, 1), +Case([2, 0, "potato", 1, 0, 0], attributes, 0), +Case([3, 1, "wheat", 0, 1, 0], attributes, 0), +Case([3, 0, "potato", 1, 1, 1], attributes, 0), +Case([0, 1, "sorrel", 1, 1, 1], attributes, -1), +Case([0, 0, "strawberry", 1, 1, 1], attributes, -1), +Case([2, 1, "strawberry", 0, 1, 0], attributes, 0), +Case([0, 1, "sorrel", 1, 1, 0], attributes, -1), +Case([3, 0, "wheat", 0, 1, 1], attributes, 0), +Case([4, 0, "strawberry", 1, 0, 1], attributes, 0), +Case([3, 1, "potato", 0, 0, 1], attributes, 0), +Case([1, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([5, 1, "wheat", 1, 0, 1], attributes, 0), +Case([5, 0, "potato", 1, 0, 1], attributes, 0), +Case([3, 0, "potato", 0, 0, 1], attributes, 0), +Case([1, 0, "wheat", 0, 1, 0], attributes, 0), +Case([5, 0, "sorrel", 0, 1, 1], attributes, 0), +Case([4, 0, "potato", 0, 1, 0], attributes, 0), +Case([0, 0, "strawberry", 0, 0, 0], attributes, 0), +Case([5, 0, "sorrel", 1, 1, 0], attributes, 1), +Case([4, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([1, 1, "strawberry", 1, 1, 0], attributes, -1), +Case([5, 0, "strawberry", 1, 0, 0], attributes, 0), +Case([5, 1, "wheat", 0, 0, 0], attributes, 0), +Case([0, 1, "sorrel", 1, 1, 0], attributes, -1), +Case([3, 1, "potato", 1, 0, 1], attributes, 0), +Case([1, 0, "sorrel", 0, 0, 0], attributes, 0), +Case([3, 0, "wheat", 0, 1, 1], attributes, 0), +Case([0, 0, "wheat", 0, 0, 1], attributes, 0), +Case([1, 0, "potato", 0, 0, 0], attributes, 0), +Case([1, 1, "sorrel", 0, 1, 0], attributes, 0), +Case([0, 1, "strawberry", 0, 1, 0], attributes, 0), +Case([5, 1, "potato", 1, 0, 1], attributes, 0), +Case([2, 0, "strawberry", 1, 1, 1], attributes, 0), +Case([4, 1, "wheat", 1, 0, 0], attributes, 0), +Case([0, 1, "sorrel", 1, 1, 0], attributes, -1), +Case([1, 0, "strawberry", 1, 1, 1], attributes, -1), +Case([4, 0, "wheat", 0, 0, 0], attributes, 0), +Case([4, 0, "strawberry", 0, 1, 0], attributes, 0), +Case([0, 0, "sorrel", 1, 0, 1], attributes, -1), +Case([1, 0, "strawberry", 0, 1, 0], attributes, 0), +Case([0, 0, "strawberry", 1, 1, 1], attributes, -1), +Case([2, 1, "potato", 0, 0, 0], attributes, 0), +Case([3, 1, "strawberry", 1, 1, 0], attributes, 1), +Case([1, 0, "sorrel", 1, 1, 1], attributes, 0), +Case([5, 1, "strawberry", 1, 1, 0], attributes, 1), +Case([2, 0, "wheat", 1, 1, 1], attributes, 0), +Case([5, 1, "strawberry", 0, 1, 0], attributes, 0), +Case([1, 1, "wheat", 0, 1, 1], attributes, 0), +Case([1, 1, "potato", 0, 1, 0], attributes, 0), +Case([4, 0, "potato", 1, 1, 0], attributes, 1), +Case([2, 1, "strawberry", 0, 0, 1], attributes, 0), +Case([0, 1, "potato", 0, 0, 1], attributes, 0), +Case([3, 0, "sorrel", 1, 0, 1], attributes, 0), +Case([4, 0, "wheat", 1, 0, 1], attributes, 0), +Case([5, 1, "sorrel", 1, 0, 0], attributes, 0), +Case([1, 0, "sorrel", 1, 0, 0], attributes, 0), +Case([5, 0, "sorrel", 1, 0, 1], attributes, 0), +Case([2, 1, "potato", 1, 0, 1], attributes, 0), +Case([1, 0, "potato", 1, 1, 1], attributes, 0), +Case([4, 0, "wheat", 1, 1, 0], attributes, 1), +Case([0, 0, "sorrel", 0, 1, 0], attributes, 0), +Case([2, 0, "wheat", 0, 0, 1], attributes, 0), +Case([0, 1, "potato", 1, 0, 1], attributes, -1), +Case([0, 1, "sorrel", 1, 0, 1], attributes, -1), +Case([1, 1, "potato", 0, 0, 1], attributes, 0), +Case([3, 0, "sorrel", 1, 1, 1], attributes, 0), +Case([0, 0, "potato", 1, 0, 1], attributes, -1), +Case([4, 0, "potato", 0, 0, 1], attributes, 0), +Case([0, 0, "strawberry", 1, 0, 0], attributes, -1), +Case([0, 0, "strawberry", 1, 1, 1], attributes, -1), +Case([5, 0, "potato", 0, 1, 1], attributes, 0), +Case([2, 0, "potato", 0, 0, 0], attributes, 0), +Case([0, 1, "potato", 1, 0, 0], attributes, -1), +Case([1, 0, "potato", 0, 0, 1], attributes, 0), +Case([4, 0, "sorrel", 1, 0, 1], attributes, 0), +Case([1, 0, "potato", 1, 0, 0], attributes, 0), +Case([5, 1, "potato", 1, 0, 1], attributes, 0), +Case([2, 1, "wheat", 1, 0, 0], attributes, 0), +Case([0, 1, "potato", 1, 1, 1], attributes, -1), +Case([5, 1, "strawberry", 0, 1, 0], attributes, 0), +Case([3, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 0, "strawberry", 1, 0, 0], attributes, 0), +Case([0, 1, "strawberry", 0, 0, 1], attributes, 0), +Case([0, 1, "wheat", 0, 0, 0], attributes, 0), +Case([0, 1, "strawberry", 1, 0, 0], attributes, -1), +Case([1, 0, "potato", 0, 0, 1], attributes, 0), +Case([1, 1, "wheat", 0, 0, 0], attributes, 0), +Case([0, 1, "strawberry", 1, 0, 1], attributes, -1), +Case([1, 1, "potato", 0, 0, 1], attributes, 0), +Case([0, 0, "wheat", 0, 0, 1], attributes, 0), +Case([4, 1, "sorrel", 1, 1, 1], attributes, 0), +Case([5, 1, "wheat", 0, 0, 1], attributes, 0), +Case([5, 1, "strawberry", 0, 0, 0], attributes, 0), +Case([4, 1, "wheat", 0, 0, 1], attributes, 0), +Case([1, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([1, 1, "potato", 1, 1, 0], attributes, 0), +Case([0, 1, "sorrel", 1, 0, 0], attributes, -1), +Case([5, 0, "sorrel", 1, 0, 0], attributes, 0), +Case([0, 0, "strawberry", 1, 1, 1], attributes, -1), +Case([0, 0, "potato", 0, 0, 0], attributes, 0), +Case([0, 0, "strawberry", 1, 1, 1], attributes, -1), +Case([4, 0, "strawberry", 0, 0, 1], attributes, 0), +Case([2, 0, "potato", 1, 0, 0], attributes, 0), +Case([4, 0, "strawberry", 0, 0, 0], attributes, 0), +Case([0, 1, "strawberry", 0, 1, 1], attributes, 0), +Case([1, 1, "wheat", 1, 1, 0], attributes, 0), +Case([3, 0, "potato", 0, 1, 0], attributes, 0), +Case([1, 1, "wheat", 0, 1, 0], attributes, 0), +Case([1, 1, "sorrel", 0, 0, 1], attributes, 0), +Case([3, 1, "wheat", 0, 0, 0], attributes, 0), +Case([3, 1, "wheat", 0, 0, 0], attributes, 0), +Case([1, 0, "wheat", 0, 1, 1], attributes, 0), +Case([5, 1, "potato", 1, 0, 1], attributes, 0), +Case([5, 0, "wheat", 0, 0, 1], attributes, 0), +Case([2, 1, "sorrel", 0, 1, 0], attributes, 0), +Case([5, 0, "sorrel", 1, 0, 0], attributes, 0), +Case([1, 0, "potato", 1, 1, 1], attributes, 0), +Case([5, 1, "wheat", 1, 1, 0], attributes, 1), +Case([3, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([5, 0, "wheat", 0, 0, 1], attributes, 0), +Case([2, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([1, 0, "potato", 1, 1, 1], attributes, 0), +Case([0, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([5, 1, "potato", 1, 1, 0], attributes, 1), +Case([2, 0, "wheat", 0, 1, 0], attributes, 0), +Case([3, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 0, "potato", 1, 1, 0], attributes, 0), +Case([1, 1, "potato", 0, 0, 0], attributes, 0), +Case([2, 1, "potato", 0, 1, 0], attributes, 0), +Case([2, 1, "wheat", 0, 1, 0], attributes, 0), +Case([2, 0, "sorrel", 1, 1, 0], attributes, 1), +Case([3, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([2, 0, "wheat", 1, 1, 1], attributes, 0), +Case([5, 0, "wheat", 1, 1, 0], attributes, 1), +Case([1, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([0, 1, "potato", 0, 0, 0], attributes, 0), +Case([5, 1, "strawberry", 1, 1, 1], attributes, 0), +Case([4, 1, "wheat", 1, 0, 0], attributes, 0), +Case([5, 1, "sorrel", 0, 0, 1], attributes, 0), +Case([1, 1, "wheat", 1, 0, 0], attributes, 0), +Case([5, 0, "strawberry", 1, 0, 1], attributes, 0), +Case([5, 0, "wheat", 1, 0, 1], attributes, 0), +Case([2, 0, "potato", 1, 0, 1], attributes, 0), +Case([3, 1, "wheat", 1, 0, 0], attributes, 0), +Case([0, 1, "strawberry", 1, 0, 0], attributes, -1), +Case([0, 1, "strawberry", 0, 1, 1], attributes, 0), +Case([3, 0, "wheat", 0, 1, 0], attributes, 0), +Case([4, 1, "potato", 1, 1, 1], attributes, 0), +Case([3, 0, "potato", 0, 0, 1], attributes, 0), +Case([2, 1, "strawberry", 1, 1, 0], attributes, 0), +Case([1, 1, "sorrel", 0, 0, 0], attributes, 0), +Case([4, 1, "wheat", 1, 0, 1], attributes, 0), +Case([2, 0, "potato", 0, 1, 0], attributes, 0), +Case([5, 0, "sorrel", 0, 1, 1], attributes, 0), +Case([0, 1, "wheat", 1, 1, 0], attributes, -1), +Case([5, 1, "wheat", 1, 0, 0], attributes, 0), +Case([2, 0, "potato", 0, 0, 0], attributes, 0), +Case([2, 0, "strawberry", 0, 1, 1], attributes, 0), +Case([4, 1, "potato", 0, 1, 1], attributes, 0), +Case([0, 1, "sorrel", 1, 1, 0], attributes, -1), +Case([1, 1, "strawberry", 1, 0, 1], attributes, -1), +Case([3, 0, "sorrel", 1, 1, 0], attributes, 1), +Case([5, 1, "wheat", 1, 0, 0], attributes, 0), +Case([4, 0, "sorrel", 1, 1, 0], attributes, 1), +Case([2, 1, "sorrel", 1, 0, 0], attributes, 0), +Case([0, 1, "wheat", 0, 1, 0], attributes, 0), +Case([5, 0, "potato", 1, 1, 0], attributes, 1), +Case([3, 1, "strawberry", 0, 1, 0], attributes, 0), +Case([5, 1, "strawberry", 0, 0, 0], attributes, 0), +Case([4, 1, "potato", 1, 1, 1], attributes, 0), +Case([5, 1, "potato", 1, 0, 1], attributes, 0), +Case([5, 1, "potato", 1, 1, 1], attributes, 0), +Case([0, 0, "sorrel", 0, 0, 0], attributes, 0), +Case([1, 1, "sorrel", 1, 1, 0], attributes, 1), +Case([0, 1, "potato", 0, 1, 0], attributes, 0), +Case([4, 1, "strawberry", 1, 1, 1], attributes, 0), +Case([0, 0, "wheat", 0, 1, 1], attributes, 0), +Case([3, 0, "wheat", 1, 1, 0], attributes, 1)] \ No newline at end of file