class FinUI

Auteur:: Brabant Mano
Version:: 0.1
Date:: 09/04/2020

Montre l'ecran de victoire

Public Class Methods

new(racine) click to toggle source
Calls superclass method
# File UI/FinUI.rb, line 16
def initialize(racine)

  super(:vertical, 10)

  @racine = racine

end

Public Instance Methods

reussi(taille, difficulte) click to toggle source
# File UI/FinUI.rb, line 24
def reussi(taille, difficulte)

  each_all do |c|
    remove(c)
  end

  add(Gtk::Label.new("Bravo vous avez gagné !!!"))

  puts "OSCOUR !!! : " , taille.inspect, difficulte.inspect

  if(difficulte == 0)

    if(taille == 7)

      puts "JEANNE !!!!!!"

      add(Gtk::Image.new(:file => "../Data/Pont Gaulois.jpg"))

    elsif(taille == 10)

      add(Gtk::Image.new(:file => "../Data/Pont Gaulois.jpg"))

    elsif(taille == 15)

      add(Gtk::Image.new(:file => "../Data/Pont Gaulois.jpg"))

    end

  elsif(difficulte == 1)

    if(taille == 7)

      add(Gtk::Image.new(:file => "../Data/Zubi Zuri.jpg"))

    elsif(taille == 10)

      add(Gtk::Image.new(:file => "../Data/Zubi Zuri.jpg"))

    elsif(taille == 15)

      add(Gtk::Image.new(:file => "../Data/Zubi Zuri.jpg"))

    end

  elsif(difficulte == 2)

    if(taille == 7)

      add(Gtk::Image.new(:file => "../Data/Golden Bridge.jpg"))

    elsif(taille == 10)

      add(Gtk::Image.new(:file => "../Data/Golden Bridge.jpg"))

    elsif(taille == 15)

      add(Gtk::Image.new(:file => "../Data/Golden Bridge.jpg"))

    end

  end

  show_all

end