Nimbin[12]?Games / 2048_bash / commits / 52a1e6d

2048_bash git · main

2048 in pure bash with highscores

game bash terminal · first commit 2022-06-06 · last commit 2022-06-06 (4 years ago) · synced 1 hour ago · upstream: github.com/nimbin2/2048_bash

Shell 99.4%
git clone https://git.christianimmanuel.de/games/2048_bash.gitwget https://git.christianimmanuel.de/games/2048_bash/archive/2048_bash.tar.gz

initial commit modified: 2048.sh modified: functions.sh modified: gameover.sh deleted: matrix.log deleted: scores

nimbin2 · 2022-06-06 09:48 · 52a1e6d4a7ea96157cafafa61e0ebab3ed43c6a2

 2048.sh      | 4 ----
 functions.sh | 8 --------
 gameover.sh  | 1 -
 matrix.log   | 7 -------
 scores       | 2 --
 5 files changed, 22 deletions(-)

diff --git a/2048.sh b/2048.sh
index fd51f90..ab93e9e 100755
--- a/2048.sh
+++ b/2048.sh
@@ -10,9 +10,6 @@ source autorun.sh
 rm log.log
 clear -x
 
-#_STTY=$(stty -g)      # Save current terminal setup
-#printf "\e[?25l"      # Turn of cursor
-#stty -echo -icanon
 
 
 function at_exit() {
@@ -52,7 +49,6 @@ while true; do
 # swipe to direction X
 	swipeX
 # set Random num matrix
-	#if $setNewRanN; then setRanN && wait; fi
 	if ${swipeState[$swipeValue]}; then setRanN; fi
 # write matrix
 	logMatrix
diff --git a/functions.sh b/functions.sh
index eabe957..e43747e 100755
--- a/functions.sh
+++ b/functions.sh
@@ -144,20 +144,12 @@ fillScore() {
 blackScreen() {
 	for ((i = 0 ; i <= MH ; i++)); do
 		printf "\e[37;40m%$((MW))s\e[0m" |tr " " " "
-		#for ((c = 0 ; c <= MW ; c++)); do
-			#printf "\e[37;40m\e[%s;%s\nf \e[0m" "$i" "$c"
-		#done
 	done
 
 }
 
 startRun() {
 	matrix=(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
-	#matrix=(4 0 0 0 8 0 0 0 128 0 0 0 2 0 0 0)
-	#matrix=(8 2 0 0 4 0 0 0 4 0 0 0 0 0 0 0)
-	#matrix=(16 2 0 0 8 2 0 0 0 128 0 0 0 0 16 16)
-	#matrix=(2110 0 64 16 16 256 32 0 0 1281 0 16 3 5 2 8)
-	#matrix=(3 7 16 128 0 4 32 0 9 4 16 512 0 4 8 128)
 	mainLoop=0
 	blackScreen
 	printStart
diff --git a/gameover.sh b/gameover.sh
index cd91648..5ceaaef 100755
--- a/gameover.sh
+++ b/gameover.sh
@@ -88,7 +88,6 @@ setHighscore() {
 	acHighestNum=1
 	printMatrix
         for ((setC=0;setC<3;setC++)); do
-                #setC=$((setC+1))
                 if [ $breakSet = true ]; then
                         if [[ "$newScore" -gt "${scores[$setC]}" ]]; then
                                 if $autorun; then pName="autorun"; echo $pName;  else
diff --git a/matrix.log b/matrix.log
deleted file mode 100644
index 9889cbe..0000000
--- a/matrix.log
+++ /dev/null
@@ -1,7 +0,0 @@
-matrix0=(0 0 0 0 2 0 0 0 0 0 0 0 0 2 0 0)
-matrix1=(4 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0)
-matrix2=(2 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0)
-matrix3=(0 0 0 2 0 0 0 0 0 0 4 0 0 0 0 8)
-matrix4=(0 0 0 0 0 0 0 0 0 0 0 2 0 2 4 8)
-matrix5=(0 0 0 0 0 0 0 0 0 0 0 2 0 2 4 8)
-matrix6=(0 2 4 2 0 0 0 8 0 2 0 0 0 0 0 0)
diff --git a/scores b/scores
deleted file mode 100644
index b188572..0000000
--- a/scores
+++ /dev/null
@@ -1,2 +0,0 @@
-scores=(1692 1688 1678)
-scoreNames=(autorun autorun autorun)