Skip to content

Commit 3fb1531

Browse files
committed
#20161102 - Clean Unusual Comment
1 parent 4dfdfa0 commit 3fb1531

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

2048/src/Game.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ public class Game {
1313
// Define Global Variable
1414
static RNG random = new RNG();
1515
static Score score = new Score();
16+
// Set notification Check Point. Default to 2048
1617
final static int iCheckPoint = 2048;
1718
static int[][] arrDimension;
18-
//static int[][] arrDimension = {{0,4,2,2},{2,2,2,0},{2,2,2,4},{4,2,2,0}};
19-
//static int[][] arrDimension = {{0,0,2,0},{2,0,2,0},{4,0,0,0},{2,2,2,0}};
20-
// Board Dimension
19+
// Board Dimension. Default: 4
2120
static int iDimension = 4;
2221
static int[] arrNumberPool = {2,2,2,2,2,2,2,2,2,4};
2322
static boolean isGameOver = false;
@@ -94,15 +93,12 @@ public static void main(String[] args) {
9493

9594
if (sInput.equalsIgnoreCase("w")){
9695
if (SlideValue(iDimension, arrDimension, 1, false)) randSetValue(iDimension, arrDimension, false);
97-
//SlideValue(iDimension, arrDimension, 1);
9896
}else if (sInput.equalsIgnoreCase("s")){
9997
if (SlideValue(iDimension, arrDimension, 2, false)) randSetValue(iDimension, arrDimension, false);
10098
}else if (sInput.equalsIgnoreCase("a")){
10199
if (SlideValue(iDimension, arrDimension, 3, false)) randSetValue(iDimension, arrDimension, false);
102-
//SlideValue(iDimension, arrDimension, 3);
103100
}else if (sInput.equalsIgnoreCase("d")){
104101
if (SlideValue(iDimension, arrDimension, 4, false)) randSetValue(iDimension, arrDimension, false);
105-
//SlideValue(iDimension, arrDimension, 4);
106102
}else{
107103
System.out.print("Your input is not defined! Consider w,s,a, or d!");
108104
System.out.print("Press any key to continue...");
@@ -181,7 +177,7 @@ public static boolean SlideValue(int iDimension, int[][] arrTile, int iSlidePosi
181177
}
182178

183179
if (iStep == 0){
184-
//System.out.println("No Move!");
180+
// No move anymore
185181
return false;
186182
}
187183
}else if (iSlidePosition == 2){
@@ -235,7 +231,7 @@ public static boolean SlideValue(int iDimension, int[][] arrTile, int iSlidePosi
235231
}
236232

237233
if (iStep == 0){
238-
//System.out.println("No Move!");
234+
// No move anymore
239235
return false;
240236
}
241237
}else if (iSlidePosition == 3){
@@ -341,7 +337,7 @@ public static boolean SlideValue(int iDimension, int[][] arrTile, int iSlidePosi
341337
}
342338

343339
if (iStep == 0){
344-
//System.out.println("No Move!");
340+
// No move anymore
345341
return false;
346342
}
347343
}

2048/src/dua0empat8/Score.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ public class Score {
88
public static int i2048Counter = 0;
99

1010
public Score(){
11-
//set first anonymous player for first time play
1211
this.__PLAYER_SCORE = this.__PLAYER_HIGHEST_SCORE = this.__GAME_LAST_DIMENSION_POINT = 0;
1312
this.__IS2048 = false;
1413
}

0 commit comments

Comments
 (0)