Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmp831 committed Apr 13, 2021
0 parents commit c0ea6d3
Show file tree
Hide file tree
Showing 7 changed files with 763 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
EMCC=emcc

all: sudoku.cpp
$(EMCC) -O3 -s WASM=1 -o main.js -s EXTRA_EXPORTED_RUNTIME_METHODS='["getValue", "setValue"]' -s EXPORTED_FUNCTIONS="['_calloc', '_returnSudoku', '_initSudoku', '_SolveSudoku']" -s EXPORT_ES6=1 -s MODULARIZE=1 sudoku.cpp
300 changes: 300 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
<!doctype html>
<html lang="en">

<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<title>Sudoku++</title>
</head>

<body>
<div class="container mt-4">
<div class="d-flex justify-content-center my-5">
<div class="btn-group" role="group" aria-label="Basic example">
<button type="button" class="btn btn-primary" id="solve-btn">Solve</button>
<button type="button" class="btn btn-danger" id="reset-btn">Reset</button>
</div>
</div>
<div class="container col-12 col-lg-6">



<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-top border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="00">
</div>
<div class="ratio ratio-1x1 border-top border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="01">
</div>
<div class="ratio ratio-1x1 border-top border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="02">
</div>
<div class="ratio ratio-1x1 border-top border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="03">
</div>
<div class="ratio ratio-1x1 border-top border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="04">
</div>
<div class="ratio ratio-1x1 border-top border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="05">
</div>
<div class="ratio ratio-1x1 border-top border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="06">
</div>
<div class="ratio ratio-1x1 border-top border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="07">
</div>
<div class="ratio ratio-1x1 border-top border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="08">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="10">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="11">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="12">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="13">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="14">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="15">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="16">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="17">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="18">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-bottom border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="20">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="21">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="22">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="23">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="24">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="25">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="26">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="27">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="28">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="30">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="31">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="32">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="33">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="34">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="35">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="36">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="37">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="38">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="40">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="41">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="42">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="43">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="44">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="45">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="46">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="47">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="48">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-bottom border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="50">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="51">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="52">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="53">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="54">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="55">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="56">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="57">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="58">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="60">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="61">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="62">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="63">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="64">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="65">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="66">
</div>
<div class="ratio ratio-1x1 border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="67">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="68">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="70">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="71">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="72">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="73">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="74">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="75">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="76">
</div>
<div class="ratio ratio-1x1">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="77">
</div>
<div class="ratio ratio-1x1 border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="78">
</div>
</div>
<div class="d-flex flex-row">
<div class="ratio ratio-1x1 border-bottom border-start border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="80">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="81">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="82">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="83">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="84">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="85">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="86">
</div>
<div class="ratio ratio-1x1 border-bottom border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="87">
</div>
<div class="ratio ratio-1x1 border-bottom border-end border-3 border-dark">
<input type="text" class="form-control mx-0 rounded-0 text-center" name="" id="88">
</div>
</div>
</div>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
crossorigin="anonymous"></script>
<script async type="module" src="sudoku-utils.js"></script>
</body>

</html>
Loading

0 comments on commit c0ea6d3

Please sign in to comment.