Skip to content

Instantly share code, notes, and snippets.

View Akjir's full-sized avatar

Stefan Stark Akjir

  • Germany
View GitHub Profile
@Akjir
Akjir / HexGrid.scala
Created June 6, 2013 13:33
Creates a simple hex grid using JavaFX and Scala.
package ca.akjir.hex
import javafx.application.Application
import javafx.event.EventHandler
import javafx.scene.Group
import javafx.scene.Scene
import javafx.scene.canvas.Canvas
import javafx.scene.canvas.GraphicsContext
import javafx.scene.input.MouseEvent
import javafx.scene.paint.Color
@Akjir
Akjir / AccessGranted.scala
Last active August 28, 2019 21:06
Access private fields and methods using Java Reflection in Scala.
object Main extends App {
val printer = new Printer[String]()
val break = true
val text = "access granted"
//cannot be accessed:
//printer.printCodeName
//printer.codeName = "Rejewski"
//printer.printCodeName