From 196ed3ec0fb9cec390c44cc6ada348eb59c5453c Mon Sep 17 00:00:00 2001 From: peet Date: Sun, 12 May 2024 14:50:36 +0200 Subject: [PATCH] implemented to String method --- bin/cards/Suit.class | Bin 1130 -> 1592 bytes src/cards/Suit.java | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/cards/Suit.class b/bin/cards/Suit.class index 2675d5c4b19ffe8928f641200862f7fa4ff1cf13..fc3210e9051699c9e30b8bfb94c1a1b41df47909 100644 GIT binary patch literal 1592 zcmZ`&-%}e^6#gzrb~j-u7;0K5EyYHg1PWqXP!o{=!3085yZo3856%)I-5Qe4l5~bw z{{~-tbH-6;e2QVlGX7wE^1(mDKScfR&C+aj+)VB{-`#WW`ObIG{_)pO7XY%bbPNbY zsY72nMkcVzU?{=ZJnRO?Q| zX)Or^63JbG;A-=*W*`)Sz^I9{GT{uG2V57m~YS#$GcKf@VOMVBCZ* zfg!<76NUs~32vJRLzCVcCQJ+o3>Te7t<*j~sJYwrLA@prEjFumeb;s!iPdHV0gRGd z>xpwhIaeyDmQ$rH z2TEDa5-_qMDbkM1iIN!{xGNZD{s_?*2yz9se}c&nc-jV%l2>c-=hg6qi=Vj?{uOMI?;tr^xY0$1=P!Nb@U_;p29SX&a%in zQsjNlM`6*U@ILc&gc1XM*gR*$jiqXsR;S-i2IM>zW&oO&-74P`D@3FokjH?EqG(#;ZsXJK|IO)9yXuA{?m=?>FQ?2 J2AbyH`35DnLI3~& diff --git a/src/cards/Suit.java b/src/cards/Suit.java index 333688d..2341a59 100644 --- a/src/cards/Suit.java +++ b/src/cards/Suit.java @@ -28,7 +28,21 @@ public enum Suit { */ @Override public String toString() { - //TODO implement - return super.toString(); + switch (this) { + case HEARTS: + return "♥"; + + case DIAMONDS: + return "♦"; + + case CLUBS: + return "♣"; + + case SPADES: + return "♠"; + + default: + return ""; + } } }