<script lang="ts">
    import village from "../village";


    function restart() {
        village.reset();
    }
</script>

{ #if $village.victory }
<section>
    <h1>Victory!</h1>
    <div>
        <button on:click={ restart }>Play again</button>
    </div>
</section>
{ /if }

<style>
    section {
        background-color: hsl(0, 0%, 10%, 0.9);
        display: grid;
        place-items: center;
        height: 100vh;
        left: 0;
        position: absolute;
        top: 0;
        width: 100vw;
    }
</style>
