Created
April 26, 2017 00:00
-
-
Save ManfredHayes/3db43b06b14a07fa8ec0c1776c505f62 to your computer and use it in GitHub Desktop.
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
public char[] pieceGenerator(int difficulty){ | |
char[] piece = new char[3]; | |
Random rng = new Random(); | |
for(int i = 0; i < 3; i++){ | |
int charNum =(int)rng.nextDouble()*difficulty + 61; | |
char placementChar = (char) charNum; | |
piece[i] = placementChar; | |
} | |
return piece; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment