Permalink
Browse files

cleanup

  • Loading branch information...
1 parent b01f6c9 commit 30d8225983feef908ce955a967431f8468a32ed9 @raimohanska committed Mar 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 worzone.js
View
@@ -261,7 +261,7 @@ function PlayerImage(player) {
}
function PlayerFigure(player, maze, messageQueue, targets, r) {
- var directionInput = Keyboard().multiKeyState(player.keyMap.directionKeyMap).map(first).distinctUntilChanged()
+ var directionInput = Keyboard().multiKeyState(player.keyMap.directionKeyMap).map(first)
var fireInput = Keyboard().keyDowns(player.keyMap.fireKey)
var controlInput = ControlInput(directionInput, fireInput)
var startPos = maze.playerStartPos(player)
@@ -416,7 +416,7 @@ function Keyboard() {
}
function keyState(keyCode, value) {
return keyDowns(keyCode).map(always([value])).
- merge(keyUps(keyCode).map(always([]))).toProperty([])
+ merge(keyUps(keyCode).map(always([]))).toProperty([]).distinctUntilChanged()
}
function multiKeyState(keyMap) {
var streams = keyMap.map(function(pair) { return keyState(pair[0], pair[1]) })

0 comments on commit 30d8225

Please sign in to comment.