-transform_coords = (coords) ->
- ret = {left: coords.left, top: coords.top}
- if state.agent is 'p2'
- ret.top = table_height - ret.top
- return ret
+transform_x = (x) -> x
+transform_y = (y) ->
+ return y unless state.agent is 'p2'
+ return table_height - card_height - y
+
+next_card_z = -> return top_card_z += 1
+
+bring_card_to_front = (card) ->
+ card.view.css "z-index": next_card_z()