'use strict'; module.exports = function(newDirection) { this.context.clearRect(0, 0, this.x1, this.y1); this.direction = newDirection; this.validateInput('direction'); if (this.isPaused) this.refreshColorsAndPos(); };