finally translated cards.py to Cards.java