+ char number_string[3];
+ int len;
+
+ len = snprintf (number_string, 3, "%d", tile->number + 1);
+ if (len < 0 || len >= 3)
+ FATAL_ERROR ("snprintf failed");
+
+ cairo_save(cr);
+ cairo_translate(cr, tile->x, tile->y);
+ rsvg_handle_render_cairo (game->blanktile, cr);
+
+ if (tile->color == BLACK)
+ cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+ if (tile->color == BLUE)
+ cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
+ if (tile->color == RED)
+ cairo_set_source_rgb (cr, 1.0, 0.0, 0.0);
+ if (tile->color == YELLOW)
+ cairo_set_source_rgb (cr, 1.0, .843, 0.0);
+ cairo_move_to (cr, 10, 25);
+ cairo_set_font_size(cr, 25);
+ cairo_show_text (cr, number_string);
+
+ cairo_restore(cr);