Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package blockmole
- import java.awt.{Color => JColor}
- object Color {
- val black = new JColor( 0, 0, 0)
- val mole = new JColor( 51, 51, 0)
- val soil = new JColor(153, 102, 51)
- val tunnel = new JColor(204, 153, 102)
- }
- object Graphics {
- import cslib.window.SimpleWindow
- val windowSize = (30, 50)
- val blockSize = 10
- val win = new SimpleWindow(blockSize * windowSize._1, blockSize * windowSize._2,
- "Digging Blockmole")
- }
- object Mole { // Representerar en blockmullvad som kan gräva
- def dig(): Unit = println("Här ska det grävas!")
- }
- object Main{
- def drawWorld(): Unit = {
- Graphics.win.moveTo(100, 10)
- Graphics.win.lineTo(200, 20)
- println("Ska rita ut underjorden!")
- }
- def main(args: Array[String]): Unit =
- println("Keep on digging!")
- drawWorld()
- Mole.dig()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement