vue-minesweeper
v0.2.0
Published
Minesweeper plugin for vuejs
Downloads
11
Readme
Vue minesweeper
Add a minesweeper game to your website, just for kicks!
Examples
Instalation
npm install vue-minesweeper
Getting started
import Vue from 'vue'; // Load vue
import App from './App'; // Load your app
import VueMinesweeper from 'vue-minesweeper';
Vue.use(VueMinesweeper); // Add the game
new Vue({
render: h => h(App),
}).$mount('#app');
Usage
Basic setup
<minesweeper-game></minesweeper-game>
Setup your own grid and bomb.
<minesweeper-game :rows="16" :cols="30" :bombs="99"></minesweeper-game>
Usage with the vue cdn
Copy paste this and you can get started.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vue minesweeper</title>
<link rel="stylesheet" href="https://unpkg.com/vue-minesweeper/dist/VueMinesweeper.css">
</head>
<body>
<div id="app">
<minesweeper-game></minesweeper-game>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://unpkg.com/vue-minesweeper/dist/VueMinesweeper.umd.min.js"></script>
<script>
var app = new Vue();
app.$mount("#app");
</script>
</body>
</html>
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!