fn draw_tile(&mut self, tile: Tile, x: i32, y: i32) {
        let (col, row) = self.tileset.location(tile).unwrap_or_else(|| {
            panic!("No image for this tile: {:?}", tile);
        });
        let tile_rect = self.tileset.get_tile_rect(col, row);
        let target_rect = Some(Rect::new(x,
                                         y,
                                         self.tileset.tile_width(),
                                         self.tileset.tile_height()));
        self.renderer.copy(self.tileset.texture(), tile_rect, target_rect);
    }
/// Draws a tile at the given coordinates.
Draws a tile at the given coordinates.
Draws a tile at the given coordinates .
fn draw_tile(&mut self, tile: Tile, x: i32, y: i32) {
        let (col, row) = self.tileset.location(tile).unwrap_or_else(|| {
            panic!("No image for this tile: {:?}", tile);
        });
        let tile_rect = self.tileset.get_tile_rect(col, row);
        let target_rect = Some(Rect::new(x,
                                         y,
                                         self.tileset.tile_width(),
                                         self.tileset.tile_height()));
        self.renderer.copy(self.tileset.texture(), tile_rect, target_rect);
    }
fn draw_tile ( & mut self , tile : Tile , x : i32 , y : i32 ) { let ( col , row ) = self . tileset . location ( tile ) . unwrap_or_else ( | | { panic ! ( " " tile ) ; } ) ; let tile_rect = self . tileset . get_tile_rect ( col , row ) ; let target_rect = Some ( Rect :: new ( x , y , self . tileset . tile_width ( ) , self . tileset . tile_height ( ) ) ) ; self . renderer . copy ( self . tileset . texture ( ) , tile_rect , target_rect ) ; }
Draws a tile at the given coordinates.
Draws a tile at the given coordinates .
&mut self
tile
Tile
x
i32
y
i32