Home

Awesome

Vue-maze

An itty-bitty maze game made as Vue.js component

PLAY DEMO

maze-vue

maze-vue-resize

maze-vue2

maze-vue-difficulty

maze-vue-strategy

maze-vue-image

Install

$ npm install maze vue-maze --save
import Vue from 'vue'
import Maze from 'vue-maze'

let v = new Vue({
  el: '#app',
  template: `
    <app>
        <maze></maze>
    </app>`,
  components: {
    Maze
  }
})

Props

PropsTypeDescriptionDefault
difficultystringdifficulty(easy|normal|hard)normal
strategystringmaze generating strategy(dig|cluster)cluster
image-pathstringthe src path to avator image(a data url of default image)
goal-image-pathstringthe src path to goal image(a data url of default image)

Events

EventPayloadDescription
initnonethe maze is initialized
startnonethe player starts to move
finishnonethe player has arrived at the goal