function varargout = l06_gui(varargin)
% L06_GUI M-file for l06_gui.fig
%      L06_GUI, by itself, creates a new L06_GUI or raises the existing
%      singleton*.
%
% Edit the above text to modify the response to help l06_gui

% Last Modified by GUIDE v2.5 02-Apr-2006 11:16:10

    % Begin initialization code - DO NOT EDIT
    gui_Singleton = 1;
    gui_State = struct('gui_Name',       mfilename, ...
                       'gui_Singleton',  gui_Singleton, ...
                       'gui_OpeningFcn', @l06_gui_OpeningFcn, ...
                       'gui_OutputFcn',  @l06_gui_OutputFcn, ...
                       'gui_LayoutFcn',  [] , ...
                       'gui_Callback',   []);
    if nargin && ischar(varargin{1})
        gui_State.gui_Callback = str2func(varargin{1});
    end

    if nargout
        [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    else
        gui_mainfcn(gui_State, varargin{:});
    end
    % End initialization code - DO NOT EDIT


% --- Executes just before l06_gui is made visible.
function l06_gui_OpeningFcn(hObject, eventdata, handles, varargin)

    % Choose default command line output for l06_gui
    handles.output = hObject;

    % Update handles structure
    guidata(hObject, handles);
    
    l06_lade_spiel;  
    

% --- Outputs from this function are returned to the command line.
function varargout = l06_gui_OutputFcn(hObject, eventdata, handles) 

    % Get default command line output from handles structure
    varargout{1} = handles.output;
    
 

% --- Executes on key press over figure1 with no controls selected.
function figure1_KeyPressFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% handles    structure with handles and user data (see GUIDATA)

    % Zeichen zur Taste in Variable c speichern
    c = get( hObject, 'CurrentCharacter' );

    % nur Cursor-Tasten: < : 28, > : 29, ^ : 30, v : 31
    switch( c )
       case {28,29,30,31}
           l06_ziehe( c );   % hier wird gezogen            
       otherwise
          beep;
          errordlg( ['Unzulässige Eingabe: ',c] );
          return;
    end
    


% --------------------------------------------------------------------
function menu_neu_Callback(hObject, eventdata, handles)
% hObject    handle to menu_neu (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
    
    l06_lade_spiel;
    

% --------------------------------------------------------------------
function menu_datei_Callback(hObject, eventdata, handles)
% hObject    handle to menu_datei (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function menu_ende_Callback(hObject, eventdata, handles)
% hObject    handle to menu_ende (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

    delete( handles.figure1 );
    

% --------------------------------------------------------------------
function menu_info_Callback(hObject, eventdata, handles)
% hObject    handle to menu_info (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --------------------------------------------------------------------
function menu_hilfe_Callback(hObject, eventdata, handles)
% hObject    handle to menu_hilfe (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


