Skip to content

Instantly share code, notes, and snippets.

View jonasborn's full-sized avatar

Jonas Born jonasborn

  • IBM
  • Munich, Germany
View GitHub Profile
@jonasborn
jonasborn / bishop.js
Last active May 6, 2021 19:34
Customized canvas version of the drunken bishop algorithm
class Bishop {
constructor(width, height, startx = null, starty = null) {
if (startx == null) startx = Math.round(width / 2)
if (starty == null) starty = Math.round(height / 2)
this.startx = startx
this.starty = starty
this.width = width;
this.height = height;
this.clearMap()