<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Logic Test
A notebook to test the classes and methods within SeaFallLogic.py.
Step1:  Ship test
Create a ship object and change its values.
Step2:  Island Test
See how class inheritence works on an island site.
<ASSISTANT_TASK:>
Python Code:
%matplotlib inline
import numpy
import matplotlib
from matplotlib.patches import Circle, Wedge, Polygon
from matplotlib.collections import PatchCollection
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.lines as mlines
import matplotlib.path as mpath
import numpy as np
import seaborn as sns
import networkx as nx
import pandas as pd
import SeaFallLogic
Explanation: Logic Test
A notebook to test the classes and methods within SeaFallLogic.py.
End of explanation
class Ship():
    # Rules, pg 8, "Province Boards" also inlcude information about ships
    def __init__(self):
        self.damage = []
        # hold, a list of objects with max length hold
        self.hold = []
        # upgrades, a list of upgrade objects of max length 2
        self.upgrades = []
        # values (explore, hold, raid, sail)
        self._values = (1, 1, 1, 1)
        # vmax is the maximum number values can reach for (explore, hold, raid,
        # sail)
        self._vmax = (5, 5, 5, 5)
    
    @property
    def values(self):
        return self._values
    
    @values.setter
    def values(self, values):
        if not isinstance(values, tuple):
            err_str = ("Not a valid data type. The data type should be a tuple"
                       " of 4 length.")
            raise ValueError(err_str)
        elif len(values) != 4:
            err_str = ("Not a valid data type. The data type should be a tuple"
                       " of 4 length.")
            raise ValueError(err_str)
        
        for val, vmax in zip(values, self.vmax):
            if val > vmax:
                raise ValueError("A ship value exceeds its max.")
        self._values = values
    @property
    def vmax(self):
        return self._vmax
    
    @vmax.setter
    def vmax(self, vmax_tuple):
        if not isinstance(vmax_tuple, tuple):
            err_str = ("Not a valid data type. The data type should be a tuple"
                       " of 4 length.")
            raise ValueError(err_str)
        elif len(vmax_tuple) != 4:
            err_str = ("Not a valid data type. The data type should be a tuple"
                       " of 4 length.")
            raise ValueError(err_str)
        for val, vmax in zip((5, 5, 5, 5), vmax_tuple):
            if val > vmax:
                raise ValueError("The maximum ship values are never less than (5, 5, 5, 5).")
        self._vmax = vmax
ship = Ship()
ship.values
Explanation: Ship test
Create a ship object and change its values.
End of explanation
class Site():
    def __init__(self, dangerous=False, defense=0):
        # Rules, pg 10, "Dangerous Sites"
        self.dangerous = dangerous
        # Rules, pg 10, "Starting an Endeavor"
        # Rules, pg 7, "Defense"
        self.defense = defense
class IslandSiteMine(Site):
    def __init__(self, dangerous=False, defense=0, gold=0):
        super().__init__(dangerous=dangerous, defense=defense)
        self.gold = gold
mine = IslandSiteMine()
mine.dangerous
mine.defense
mine2 = IslandSiteMine(dangerous=True, defense=10, gold=6)
mine2.gold
class Goods():
    valid_goods = {
        "iron",
        "linen",
        "spice",
        "wood"
        }
    def __init__(self):
        pass
Goods.valid_goods
"iron" in Goods.valid_goods
Explanation: Island Test
See how class inheritence works on an island site.
End of explanation
<END_TASK>