SHOW:
|
|
- or go back to the newest paste.
1 | - | Mam klasę: |
1 | + | |
2 | // np. FlashCard( ("POL", "ENG"), "zielony", "green") | |
3 | ||
4 | class StackIndetifier(val name: String) | |
5 | ||
6 | trait FlashCardsDBConnector { | |
7 | - | oraz interface: |
7 | + | |
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) { | |
14 | def addCard(card: FlashCard) | |
15 | - | class CardsStack(val name: String, val cards: Array[FlashCard], DBConnector: FlashCardsDBConnector) { |
15 | + | |
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) |