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