Skip to content

Commit

Permalink
jamshred.player: Use nano-count instead of system-micros.
Browse files Browse the repository at this point in the history
  • Loading branch information
erg committed Oct 27, 2014
1 parent 6f5ff65 commit 37b5ef7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extra/jamshred/player/player.factor
@@ -1,6 +1,6 @@
! Copyright (C) 2007, 2008 Alex Chapman
! See http://factorcode.org/license.txt for BSD license.
USING: accessors calendar.unix colors.constants combinators jamshred.log
USING: accessors colors.constants combinators jamshred.log
jamshred.oint jamshred.sound jamshred.tunnel kernel locals math
math.constants math.order math.ranges math.vectors math.matrices
sequences shuffle specialized-arrays strings system ;
Expand Down Expand Up @@ -37,11 +37,11 @@ CONSTANT: max-speed 30.0

: play-in-tunnel ( player segments -- )
>>tunnel to-tunnel-start ;

: update-time ( player -- seconds-passed )
system-micros swap [ last-move>> - 1000000 / ] [ last-move<< ] 2bi ;
nano-count swap [ last-move>> - 1,000,000,000 / ] [ last-move<< ] 2bi ;

: moved ( player -- ) system-micros swap last-move<< ;
: moved ( player -- ) nano-count swap last-move<< ;

: speed-range ( -- range )
max-speed [0,b] ;
Expand Down

0 comments on commit 37b5ef7

Please sign in to comment.