Skip to content

Commit

Permalink
Fix rotating I shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
samtay committed Jul 3, 2017
1 parent 99d6a9c commit 6a3764f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tetris.hs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ rotate' b@(Block s o@(V2 xo yo) cs)
rotateWith dir = b & extra %~ fmap dir
clockwise = (+ o) . (cwperp) . (subtract o)
counterclockwise = (+ o) . LV.perp . (subtract o)
cwperp (V2 x y) = V2 x (-y)
cwperp (V2 x y) = V2 y (-x)

-- | Get coordinates of entire block
coords :: Block -> [Coord]
Expand Down

0 comments on commit 6a3764f

Please sign in to comment.