Skip to content

OguzhanUmutlu/stack-chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stack-chess

Stack Chess API. More information: https://www.chess.com/forum/view/general/stack-chess

Example usage

<link rel="stylesheet" href="./lib/stack-chess.css">
<title>Stack Chess</title>

<div class="board"></div>
<div class="sweep-box">Drag your piece here to <i>sweep</i> it!</div>

<script type="module">
    import {StackChess} from "./lib/stack-chess.js";

    const game = new StackChess;
    game.setDiv(
            document.querySelector(".board"),
            document.querySelector(".sweep-box")
    );
    game.reset();
</script>

<style>
    body {
        font-family: system-ui, sans-serif;
        background: #2a2626;
        overflow: hidden;
        color: white;
    }

    .sweep-box {
        position: absolute;
        top: 4%;
        left: 50%;
        translate: -50%;
        padding: 1%;
        background: #b2afaf;
        border-radius: 10px;
    }

    .sweep-box:hover {
        background: #739552;
        cursor: pointer;
    }
</style>

API

TODO.