"""
 * The MIT License (MIT)
 *
 * Copyright (c) 2015 Samson Danziger
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
"""

global LAYER_BLOCKS = 3
global STABLE_LAYERS = [
    [1, 1, 1],
    [1, 1, 0],
    [1, 0, 1],
    [0, 1, 1],
    [0, 1, 0]
]
global STABILITY = 100

class NonExistentBlockException(Exception):
    def __str__(self):
        return repr("That block does not exist.")

class _Block(object):
    def __init__(self, data):
        self.data = data
        self.friction = random.randint(1, 10)

    def getData(self):
        return self.data

    def getFriction(self):
        return self.friction

class _Layer(object):
    blocks = []

    def __init__(self):
        for i in range(LAYER_BLOCKS):
            self.blocks.append(None)

    def add(self, data, index):
        if index not in range(LAYER_BLOCKS):
            raise NonExistentBlockException
        if blocks[index] != None:
            return False
        else:
            blocks[index] = data
            return True

    def remove(self, index):
        if index not in range(LAYER_BLOCKS) or blocks[index] == None:
            raise NonExistentBlockException
        d = blocks[index]
        blocks[index] = None
        return d.getData();

    def peek(self, index):
        if index not in range(LAYER_BLOCKS) or blocks[index] == None:
            raise NonExistentBlockException
        d = blocks[index]
        return d.getData()

    def friction(self, index):
        if index not in range(LAYER_BLOCKS) or blocks[index] == None:
            raise NonExistentBlockException
        d = blocks[index]
        return f.getFriction()

class Jenga(object):
    layers = []
    height = 0
    removed_blocks = 0
    stability = STABILITY

    def add(self, data, layer_index=None):
        pass

    def remove(self, layer, layer_index):
        pass

    def peek(self, layer, layer_index):
        pass

    def friction(self, layer, layer_index):
        pass

    def destroy(self):
        pass

    def _collapse(self):
        pass

    def _check_stability(self):
        pass

    def _check_structure(self, layer, layer_index):
        pass
        

@@ -1,14 +1,15 @@
 %22%22%22%0A 
-*
+  
  The MIT
@@ -23,21 +23,20 @@
 e (MIT)%0A
- *%0A *
+%0A   
  Copyrig
@@ -63,21 +63,20 @@
 anziger%0A
- *%0A *
+%0A   
  Permiss
@@ -146,17 +146,18 @@
 a copy%0A 
-*
+  
  of this
@@ -228,17 +228,18 @@
 o deal%0A 
-*
+  
  in the 
@@ -309,17 +309,18 @@
 rights%0A 
-*
+  
  to use,
@@ -383,25 +383,26 @@
 nd/or sell%0A 
-*
+  
  copies of t
@@ -461,17 +461,18 @@
 are is%0A 
-*
+  
  furnish
@@ -521,21 +521,20 @@
 itions:%0A
- *%0A *
+%0A   
  The abo
@@ -606,17 +606,18 @@
 in all%0A 
-*
+  
  copies 
@@ -661,13 +661,12 @@
 re.%0A
- *%0A *
+%0A   
  THE
@@ -738,17 +738,18 @@
 ESS OR%0A 
-*
+  
  IMPLIED
@@ -815,17 +815,18 @@
 ILITY,%0A 
-*
+  
  FITNESS
@@ -895,17 +895,18 @@
 LL THE%0A 
-*
+  
  AUTHORS
@@ -970,17 +970,18 @@
  OTHER%0A 
-*
+  
  LIABILI
@@ -1052,17 +1052,18 @@
  FROM,%0A 
-*
+  
  OUT OF 
@@ -1138,9 +1138,10 @@
 HE%0A 
-*
+  
  SOF
@@ -3183,13 +3183,4 @@
 ass%0A
-        %0A

reformat license information