"""Definition and implementation of MoveToFront, a linked list class which
moves every item searched for to the front of the list."""

from node import Node

class MoveToFront(object):
    
    """Implementation of a linked list which moves items to the front as they
    are searched for."""
    
    def __init__(self):
        """Create an empty linked list."""
        self._head = None
        
    def insert(self, value):
        """Insert value to front of the list."""
        pass
    
    def search(self, value):
        """Search for value in the list, and if found, return True and move
        that node to the front of the list; otherwise return False."""
        pass
    
    def __str__(self):
        """Return a string representation of the list."""
        elements = []
        current = self._head
        while current is not None:
            elements.append(current.data)
            current = current.next
        return str(elements)
        
