Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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) {
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement