balanced the scores
parent
cda443d33f
commit
a8f5c24eaa
|
@ -59,8 +59,8 @@ class Afutc:
|
|||
row = "".join(self.char if field else " " for field in row)
|
||||
print(f"║{row}║")
|
||||
row = "═" * (self.board.shape[1])
|
||||
# print(f"╚{row}╝")
|
||||
print(str(self.pivot) + "\t" + self.debug)
|
||||
print(f"╚{row}╝")
|
||||
# print(str(self.pivot) + "\t" + self.debug)
|
||||
except CursesException:
|
||||
self.pause()
|
||||
|
||||
|
@ -74,8 +74,7 @@ class Afutc:
|
|||
down = self.board[i + 1:]
|
||||
new_row = np.zeros(shape=(1, WIDTH))
|
||||
self.board = np.concatenate((new_row, upper, down))
|
||||
if count:
|
||||
self.score += 100 if count < 3 else 150
|
||||
self.score += (10 * count) + (5 if count > 3 else 0)
|
||||
# Generate a new piece
|
||||
self.current_move.fill(0.)
|
||||
new_piece = np.array(choice(PIECES))
|
||||
|
@ -152,9 +151,8 @@ class Afutc:
|
|||
input = self.input
|
||||
self.new_random_piece()
|
||||
|
||||
scr.timeout(1000)
|
||||
|
||||
while self.running:
|
||||
scr.timeout(1000 - self.score)
|
||||
scr.refresh()
|
||||
char = catch(input, "")
|
||||
scr.clear()
|
||||
|
|
Loading…
Reference in New Issue