Skip to content

Commit

Permalink
rm redundant field
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartonrealista committed Jul 19, 2024
1 parent e5bf4a4 commit 83c0519
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ struct Game {
menu: Menu,
board: Board,
old_board: Board,
has_ended: bool,
}
impl Game {
fn new() -> Game {
Game {
board: Board::new(4, 4),
old_board: Board::new(4, 4),
has_ended: false,
menu: Menu {
width_inptut: String::from("4"),
height_inptut: String::from("4"),
Expand Down Expand Up @@ -428,7 +426,6 @@ impl Application for App2048 {
Message::Reset => {
self.game.board = Board::new(self.game.menu.width, self.game.menu.height);
self.game.old_board = self.game.board.clone();
self.game.has_ended = false;
}
Message::Event(Event::Keyboard(keyboard::Event::KeyPressed { key, .. })) => {
let old_board = self.game.board.clone();
Expand Down

0 comments on commit 83c0519

Please sign in to comment.