mirror of
https://github.com/mii443/rustris.git
synced 2025-08-22 16:25:42 +00:00
fix check clear
This commit is contained in:
@ -5,9 +5,9 @@ mod rustris;
|
||||
mod mino_rotation;
|
||||
mod game_status;
|
||||
mod super_rotation;
|
||||
use std::{io::stdout, process::exit, sync::{Arc, Mutex}, thread, time::Duration};
|
||||
use std::{io::stdout, sync::{Arc, Mutex}, thread, time::Duration};
|
||||
|
||||
use crossterm::{cursor, event::{Event, KeyCode, KeyEvent, KeyModifiers, read}, execute, style::{Color, Print, ResetColor, SetBackgroundColor, SetForegroundColor}, terminal::{self, Clear, ClearType, enable_raw_mode}};
|
||||
use crossterm::{cursor, event::{Event, KeyCode, KeyEvent, KeyModifiers, read}, execute, style::{Color, Print, ResetColor, SetBackgroundColor}, terminal::{self, Clear, ClearType, enable_raw_mode}};
|
||||
use game_data::GameData;
|
||||
use game_status::GameStatus;
|
||||
use mino_rotation::MinoRotation;
|
||||
@ -164,6 +164,8 @@ fn main() {
|
||||
} else {
|
||||
rustris_rc.place_control_mino(Block::Block);
|
||||
rustris_rc.next_mino();
|
||||
rustris_rc.check_clear();
|
||||
|
||||
ground_flag = false;
|
||||
*control_count_rc.lock().unwrap() = 0;
|
||||
before_control_count = 0;
|
||||
@ -235,6 +237,7 @@ fn main() {
|
||||
modifiers: KeyModifiers::NONE
|
||||
}) => {
|
||||
let mut rustris = rustris.lock().unwrap();
|
||||
|
||||
if let Some(holding) = rustris.game_data.hold_mino.clone() {
|
||||
let control_tmp = rustris.game_data.control_mino.clone();
|
||||
rustris.game_data.control_mino = Some(holding);
|
||||
|
Reference in New Issue
Block a user