Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gkdp on github.
  • I am dastin (https://keybase.io/dastin) on keybase.
  • I have a public key ASCg5A69jhgHeX6i7JmiEZs5Vm0aTE4cuE7W_XiPJ6WgJQo

To claim this, I am signing this object:

@gkdp
gkdp / Player.js
Last active June 1, 2018 13:41
Solution for beginner mode in warrior js
class Player {
constructor() {
this.health = 20;
}
playTurn(warrior) {
if (this.hasCaptiveBehind(warrior)) {
if (warrior.feel('backward').isEmpty()) {
return warrior.walk('backward');
} else {