Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartonrealista committed Jul 19, 2024
1 parent 83c0519 commit cd24ea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl App2048 {
}

fn playfield(game: &Game) -> widget::Container<'_, Message, cosmic::Theme> {
let tilebutton = |id: usize| {
let tile_widget = |id: usize| {
match game.board.0[id] {
Tile {
tilecontent: Some(2),
Expand Down Expand Up @@ -568,7 +568,7 @@ fn playfield(game: &Game) -> widget::Container<'_, Message, cosmic::Theme> {
};
let playboard = (0..game.menu.height).fold(Grid::new(), |acc, row| {
let new_row = (0..game.menu.width).fold(Row::new(), |acc2, column| {
acc2.push(tilebutton(pair_to_index(row, column, game.menu.width)))
acc2.push(tile_widget(pair_to_index(row, column, game.menu.width)))
});
acc.push(new_row.spacing(2).align_items(Alignment::Center))
.insert_row()
Expand Down

0 comments on commit cd24ea1

Please sign in to comment.