import { nextCoord } from '../../../../utils';
import checkCollide from '../../../../collisions';
import { pixelToTile } from '../../../../tiles';

import interfaceWithObjects from '../../Common/interface-objects';

export default function tryMove(direction) {
  if (this.moving) return;

  this.face(direction);

  const moveSpeed = 10;

  const nextPixelCoord = nextCoord({ x: this.x, y: this.y }, direction, moveSpeed);

  const collisions = checkCollide.call(this, nextPixelCoord);

  if (collisions.collides === false) {
    interfaceWithObjects(collisions.objects, 'collide', this);

    this.move(nextPixelCoord);
  } else {
    this.cursor.move();
  }
}

@@ -141,16 +141,62 @@
 iles';%0A%0A
+import devtools from '../../../../devtools';%0A%0A
 import i
@@ -254,16 +254,16 @@
 jects';%0A
-
 %0Aexport 
@@ -372,16 +372,58 @@
 eSpeed =
+ devtools.enabled ? devtools.playerSpeed :
  10;%0A%0A  
@@ -568,16 +568,16 @@
 oord);%0A%0A
-
   if (co
@@ -603,16 +603,57 @@
 == false
+ %7C%7C (devtools.enabled && devtools.noclip)
 ) %7B%0A    

Add noclip and fast player speed to devtools