Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lemolatoon committed Sep 24, 2021
1 parent fdb1484 commit 1b1104f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ L: ホールド

スーパーローテーションシステム: 実装済

ネクスト表示: 未実装
ネクスト表示: 実装済

![tetris](https://user-images.githubusercontent.com/63438515/134529925-9f04f9af-06ed-4fc4-94a7-81bc0edfaa92.gif)
5 changes: 0 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,16 @@ impl Lienzo {
}

fn place_check(&mut self, now: chrono::DateTime<chrono::Local>) {
println!("delta: {}", now.timestamp_millis() - self.now_placement.timestamp_millis());
let droppable = self.grid.next.droppable(&self.grid.colors); // dropできるのかどうか
if droppable {
println!("droppable");
self.now_placement = now;
} else if now.timestamp_millis() - self.now_placement.timestamp_millis() > Self::PLACEMENT_LOCK_DOWN_DELTA {
// droppable かつ 所定時間以上経過
self.place_flag = true;
println!("now placing");
self.grid.next.place(&mut self.grid.colors);
self.grid.next = self.grid.get_mino();
self.now_placement = now;
self.place_flag = false;
} else {
println!("waiting...");
}
}

Expand Down

0 comments on commit 1b1104f

Please sign in to comment.