View difference between Paste ID: 1rsqy3ia and juA83Q0T
SHOW: | | - or go back to the newest paste.
1
class FlashCard(val langFromTo: (String,String), val question: String, val answer: String)
2
// np. FlashCard( ("POL", "ENG"), "zielony", "green")
3
4
class StackIndetifier(val name: String)
5
6
trait FlashCardsDBConnector {
7
	def addCard(card: FlashCard, stack: StackIndetifier)
8
	def removeCard(card: FlashCard, stack: StackIndetifier)
9
	def swapCard(from: FlashCard, to: FlashCard, stack: StackIndetifier)
10
	
11
	def getCardsFromStack(stack: StackIndetifier)
12
}
13-
trait CardsStack(val name: String, val cards: Array[FlashCard], DBConnector: FlashCardsDBConnector) {
13+
trait CardsStack {
14
	def addCard(card: FlashCard)
15
	def removeCard(card: FlashCard)
16
	def swapCard(from: FlashCard)
17
	
18
	def getAll()
19
	def getAllSchuffled()
20
	def getNext()
21
	def getRandom()
22
}
23
// np. CardsStack(val name: String, val cards: Array[FlashCard], DBConnector: FlashCardsDBConnector)