<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Boxy Notes</title>
    <style>
        /* Body and general styling */
        body {
            font-family: 'Courier New', monospace;
            margin: 0;
            padding: 0;
            background-color: #800080; /* Purple background */
            color: white;
            text-align: center;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        /* Boxy container with purple and white design */
        .container {
            width: 400px;
            height: 400px;
            background-color: #4B0082; /* Dark purple background */
            border: 5px solid #8A2BE2; /* Lighter purple border */
            padding: 20px;
            position: relative;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
        }

        /* Title inside the container */
        .container p:first-child {
            font-size: 24px;
            color: #FFD700; /* Yellow text for the title */
            font-weight: bold;
            text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
        }

        /* The notes paragraph */
        .container p.note {
            font-size: 16px;
            color: white;
            background-color: #6A5ACD; /* Slate blue background for notes */
            border: 2px solid #8A2BE2; /* Purple border around note */
            border-radius: 10px;
            padding: 10px;
            margin: 20px 0;
            min-height: 250px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            white-space: pre-wrap; /* Keeps line breaks */
            overflow-y: auto; /* Scrollable if the note exceeds height */
        }

        /* Footer for version or copyright */
        footer {
            position: absolute;
            bottom: 10px;
            font-size: 12px;
            color: #FFD700;
            text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
        }

        /* Button styles (optional - for demo purposes) */
        .container button {
            background-color: #8A2BE2;
            color: white;
            padding: 10px 20px;
            font-size: 16px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            transition: background-color 0.3s ease;
        }

        .container button:hover {
            background-color: #7B68EE;
        }

    </style>
</head>
<body>

    <!-- Notes container -->
    <div class="container">
        <p>My Pygame Notes</p>
        <p><strong>Importing PyGame</strong>: <br>To use PyGame in your Python program, you need to import the library with the statement <code>import pygame</code>.</p>

        <p><strong>Setting Display Mode</strong>: <br>To create a window for your game, use <code>pygame.display.set_mode((width, height))</code>, where <code>width</code> and <code>height</code> represent the screen dimensions. Example: <code>pygame.display.set_mode((800, 600))</code> will create an 800x600 window.</p>

        <p><strong>Using For Loops</strong>: <br>In PyGame, a <code>for</code> loop can be used for tasks like iterating over multiple objects or handling events. Example: <code>for event in pygame.event.get():</code> checks for each event in the event queue.</p>

        <p><strong>Using While Loops</strong>: <br>The <code>while</code> loop is commonly used for the game loop, which runs continuously to check for events, update the screen, and render graphics. Example: <code>while running:</code> keeps the game running until the condition changes.</p>

        <p><strong>Drawing a Rectangle</strong>: <br>To draw a rectangle on the screen, use the function <code>pygame.draw.rect(screen, color, pygame.Rect(x, y, width, height))</code>. Example: <code>pygame.draw.rect(screen, (255, 0, 0), pygame.Rect(100, 100, 200, 150))</code> draws a red rectangle at position (100, 100) with size 200x150.</p>

        <p><strong>Drawing a Circle</strong>: <br>To draw a circle, use the function <code>pygame.draw.circle(screen, color, (x, y), radius)</code>. Example: <code>pygame.draw.circle(screen, (0, 255, 0), (300, 300), 50)</code> draws a green circle with a radius of 50 at position (300, 300).</p>

        <p><strong>Drawing a Polygon</strong>: <br>To draw a polygon, use <code>pygame.draw.polygon(screen, color, points)</code>, where <code>points</code> is a list of (x, y) coordinates. Example: <code>pygame.draw.polygon(screen, (0, 0, 255), [(400, 100), (500, 200), (400, 300)])</code> draws a blue triangle.</p>

        <p><strong>Flipping the Screen</strong>: <br>After drawing everything on the screen, you need to update the display using <code>pygame.display.flip()</code>. This will make all the changes visible. Example: <code>pygame.display.flip()</code> refreshes the entire window.</p>

        <p><strong>Quitting</strong>: <br>Code:  for event in pygame.event.get():
            if event.type == pygame.QUIT:
                drawing = False</p>
        <p><strong>Starter Code</strong>: <br> 
            import pygame as pg

            pg.init()
            
            window = pg.display.set_mode([400, 400])
            
            window.fill((255, 255, 255))</p>
     
    </div>


</body>
</html>
