Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am Ceva24 on github.
  • I am ceva24 (https://keybase.io/ceva24) on keybase.
  • I have a public key whose fingerprint is 917C DAF9 077F 2438 D9CE 04AD 0A23 3DBB 34FA D805

To claim this, I am signing this object:

@ceva24
ceva24 / TetrisRandomizer2.groovy
Last active September 6, 2015 13:55
The Tetris Randomizer algorithm implemented in Groovy. Specifically the TGM2 variant.
def rng = new Random()
def blocks = ['T', 'I', 'L', 'J', 'S', 'Z', 'O']
def history = ['Z', 'Z', 'S', 'S'] as ArrayDeque
def first = true
def nextPiece = {
def block
@ceva24
ceva24 / TetrisRandomizer.groovy
Last active August 29, 2015 14:57
The Tetris Randomizer algorithm implemented in Groovy. Specifically the TGM2 variant.
def rng = new Random()
def blocks = ['T', 'I', 'L', 'J', 'S', 'Z', 'O']
def history = ['Z', 'S', 'Z', 'S'] as ArrayDeque
def maxTilePosition = 4
def nextPiece = {
def block
@ceva24
ceva24 / StoneWall.java
Last active October 23, 2020 15:10
A solution to the Stone Wall Codility problem
import java.util.ArrayList;
class Solution
{
public int solution(int[] H)
{
// rules
/*
* so when we find two indices that are of the same height, we can use the same block, providing all the values in-between are higher.
*