--- a/progs/lecture3.scala Fri Oct 05 11:25:53 2018 +0100
+++ b/progs/lecture3.scala Fri Oct 05 11:27:16 2018 +0100
@@ -130,6 +130,24 @@
case object Saturday extends Day
case object Sunday extends Day
+abstract class Suit
+case object Spades extends Suit
+case object Hearts extends Suit
+case object Diamonds extends Suit
+case object Clubs extends Suit
+
+//define function for colour of suits
+
+abstract class Rank
+case class Ace extends Rank
+case class King extends Rank
+case class Queen extends Rank
+case class Jack extends Rank
+case class Num(n: Int) extends Rank
+
+//define functions for beats
+//beats Ace _ => true
+//beats _ Acs => false
// ... a bit more useful: Roman Numerals