File size: 1,341 Bytes
ce10613
8a0b26b
ce10613
 
8e80adf
 
ce10613
 
 
 
 
 
 
 
 
 
8a0b26b
 
 
8e80adf
8a0b26b
 
 
 
ce10613
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a0b26b
8e80adf
ce10613
8e80adf
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React, { useState } from 'react';
import './App.css';
import PredefinedPuzzlePage from './pages/PredefinedPuzzlePage';
import CustomPuzzlePage from './pages/CustomPuzzlePage';

function App() {
  const [currentPage, setCurrentPage] = useState('predefined');

  const renderPage = () => {
    switch (currentPage) {
      case 'predefined':
        return <PredefinedPuzzlePage />;
      case 'custom':
        return <CustomPuzzlePage />;
      default:
        return <PredefinedPuzzlePage />;
    }
  };

  return (
    <div className="app-container">
      <header className="app-header">
        <h1>🦓 Zebra Puzzle Solver</h1>
        <p>Solve complex logic puzzles using AI-powered constraint satisfaction</p>
        
        {/* Navigation Tabs */}
        <nav className="page-navigation">
          <button 
            className={`nav-tab ${currentPage === 'predefined' ? 'active' : ''}`}
            onClick={() => setCurrentPage('predefined')}
          >
            📚 Predefined Puzzles
          </button>
          <button 
            className={`nav-tab ${currentPage === 'custom' ? 'active' : ''}`}
            onClick={() => setCurrentPage('custom')}
          >
            ✏️ Custom Puzzle
          </button>
        </nav>
      </header>

      {renderPage()}
    </div>
  );
}

export default App;