card.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. '''
  2. * This file is part of the Chinchon (https://notabug.org/alkeon/chinchon.
  3. * Copyright (c) 2020 Alejandro "alkeon" Castilla.
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, version 3.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. '''
  17. class Card:
  18. def __init__(self, number, suit):
  19. self.number = number
  20. self.suit = suit
  21. def get_suit(self):
  22. return self.suit
  23. def get_number(self):
  24. return self.number
  25. def __str__(self):
  26. return str(self.number) + self.suit + " "
  27. def __repr__(self):
  28. return str(self.number) + self.suit + " "