This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Robot | |
int SLEEP = 2000 | |
int MAX_Y = 400 | |
int MAX_X = 400 | |
Robot robot = new Robot() | |
Random random = new Random() | |
println "Mouse Pointer under control" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def formatTextInColumns(def text, def separator, boolean mantainSeparator){ | |
if (!text){ | |
return "" | |
} | |
def columnSize = [] | |
def result = "" | |
text.eachLine{ | |
it.split("\\"+separator).eachWithIndex{element, index -> | |
if (element.length()>columnSize[index]?:0){ | |
columnSize[index]=element.length() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grapes( | |
@Grab(group='com.squidpony', module='squidlib', version='1.95.1') | |
) | |
import squidpony.squidgrid.gui.awt.event.SGMouseListener | |
import squidpony.squidgrid.gui.swing.SwingPane | |
import squidpony.squidcolor.SColor | |
import squidpony.squidcolor.SColorFactory | |
import javax.swing.* | |
import javax.swing.event.MouseInputListener |