tutostudio1

LÓGICA - JOGO DA FORCA

Apr 12th, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.51 KB | None | 0 0
  1. package jogo_forca;
  2.  
  3. public class Logica {
  4.  
  5.     public static void main(String[] args) {
  6.         Interface iu = new Interface();
  7.         do {
  8.             iu.exibeMenu1();
  9.             if (iu.getOp1() == 1) {
  10.                 do {
  11.                     iu.exibeMenu2();
  12.                     if (iu.getOp2() == 1 || iu.getOp2() == 2) {
  13.                         Modelo fun = new Modelo();
  14.                         fun.gerar(iu.getOp2() - 1);
  15.                         iu.limpaTela();
  16.                         fun.geraTraco();
  17.                         fun.calcTamanho();
  18.                         fun.geraDica();
  19.                         while (fun.getFalta() > 0) {
  20.                             iu.limpaTela();
  21.                             iu.exibeBoneco(fun.getErros());
  22.                             iu.exibeDicas(fun.getTamanhof(), fun.getDica());
  23.                             iu.exibeEspacos(fun.getPalavra());
  24.                             iu.exibeLet(fun.getLet_errada());
  25.                             if(fun.isRep()==true){
  26.                                 iu.exibeRep();
  27.                             }
  28.                             iu.recebeLetra();
  29.                             fun.procLetra(iu.getLetra());
  30.                             fun.verifica();
  31.                         }
  32.                         iu.exibeResultado(fun.isPla(), fun.getRes());
  33.                         iu.setOp2(0);
  34.                     }
  35.                 } while (iu.getOp2() == 1 || iu.getOp2() == 2);
  36.             }
  37.         } while (iu.getOp1() == 1);
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment