Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. package blockmole
  2. import java.awt.{Color => JColor}
  3.  
  4. object Color {
  5. val black = new JColor( 0, 0, 0)
  6. val mole = new JColor( 51, 51, 0)
  7. val soil = new JColor(153, 102, 51)
  8. val tunnel = new JColor(204, 153, 102)
  9. }
  10. object Graphics {
  11. import cslib.window.SimpleWindow
  12.  
  13. val windowSize = (30, 50)
  14. val blockSize = 10
  15.  
  16. val win = new SimpleWindow(blockSize * windowSize._1, blockSize * windowSize._2,
  17. "Digging Blockmole")
  18. }
  19. object Mole { // Representerar en blockmullvad som kan gräva
  20. def dig(): Unit = println("Här ska det grävas!")
  21. }
  22.  
  23. object Main{
  24. def drawWorld(): Unit = {
  25. Graphics.win.moveTo(100, 10)
  26. Graphics.win.lineTo(200, 20)
  27. println("Ska rita ut underjorden!")
  28. }
  29.  
  30. def main(args: Array[String]): Unit =
  31. println("Keep on digging!")
  32.  
  33. drawWorld()
  34. Mole.dig()
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement