.class public TicTacToe

.super joos/lib/WigApplet

.field private protected s1 Ljava/lang/String;
.field private protected s2 Ljava/lang/String;
.field private protected s3 Ljava/lang/String;
.field private protected s4 Ljava/lang/String;
.field private protected s5 Ljava/lang/String;
.field private protected s6 Ljava/lang/String;
.field private protected s7 Ljava/lang/String;
.field private protected s8 Ljava/lang/String;
.field private protected s9 Ljava/lang/String;
.field private protected mark Ljava/lang/String;
.field private protected notImage Ljava/awt/Image;
.field private protected crossImage Ljava/awt/Image;
.field private protected f Ljoos/lib/JoosIO;

.method public <init>()V
  .limit locals 1
  .limit stack 3
  aload_0
  invokenonvirtual joos/lib/WigApplet/<init>()V
  new joos/lib/JoosIO
  dup
  invokenonvirtual joos/lib/JoosIO/<init>()V
  dup
  aload_0
  swap
  putfield TicTacToe/f Ljoos/lib/JoosIO;
  pop
  return
.end method

.method public init()V
  .limit locals 1
  .limit stack 6
  aload_0
  aload_0
  invokevirtual java/applet/Applet/getCodeBase()Ljava/net/URL;
  ldc "images/not.gif"
  invokevirtual java/applet/Applet/getImage(Ljava/net/URL;Ljava/lang/String;)Ljava/awt/Image;
  dup
  aload_0
  swap
  putfield TicTacToe/notImage Ljava/awt/Image;
  pop
  aload_0
  aload_0
  invokevirtual java/applet/Applet/getCodeBase()Ljava/net/URL;
  ldc "images/cross.gif"
  invokevirtual java/applet/Applet/getImage(Ljava/net/URL;Ljava/lang/String;)Ljava/awt/Image;
  dup
  aload_0
  swap
  putfield TicTacToe/crossImage Ljava/awt/Image;
  pop
  aload_0
  ldc "i1"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s1 Ljava/lang/String;
  pop
  aload_0
  ldc "i2"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s2 Ljava/lang/String;
  pop
  aload_0
  ldc "i3"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s3 Ljava/lang/String;
  pop
  aload_0
  ldc "i4"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s4 Ljava/lang/String;
  pop
  aload_0
  ldc "i5"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s5 Ljava/lang/String;
  pop
  aload_0
  ldc "i6"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s6 Ljava/lang/String;
  pop
  aload_0
  ldc "i7"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s7 Ljava/lang/String;
  pop
  aload_0
  ldc "i8"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s8 Ljava/lang/String;
  pop
  aload_0
  ldc "i9"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s9 Ljava/lang/String;
  pop
  aload_0
  getfield TicTacToe/f Ljoos/lib/JoosIO;
  ldc "s1 is ["
  dup
  ifnull null_2
  goto stop_3
  null_2:
  pop
  ldc "null"
  stop_3:
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  dup
  ifnull null_4
  goto stop_5
  null_4:
  pop
  ldc "null"
  stop_5:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_0
  goto stop_1
  null_0:
  pop
  ldc "null"
  stop_1:
  ldc "]"
  dup
  ifnull null_6
  goto stop_7
  null_6:
  pop
  ldc "null"
  stop_7:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  aload_0
  getfield TicTacToe/f Ljoos/lib/JoosIO;
  ldc "equal? "
  dup
  ifnull null_8
  goto stop_9
  null_8:
  pop
  ldc "null"
  stop_9:
  new java/lang/Boolean
  dup
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  invokenonvirtual java/lang/Boolean/<init>(Z)V
  dup
  ifnull null_10
  invokevirtual java/lang/Boolean/toString()Ljava/lang/String;
  goto stop_11
  null_10:
  pop
  ldc "null"
  stop_11:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  aload_0
  ldc "mark"
  invokevirtual java/applet/Applet/getParameter(Ljava/lang/String;)Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/mark Ljava/lang/String;
  pop
  aload_0
  invokevirtual java/awt/Component/repaint()V
  return
.end method

.method public paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  .limit locals 5
  .limit stack 5
  aload 4
  ldc "X"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq stop_0
  aload_1
  aload_0
  getfield TicTacToe/crossImage Ljava/awt/Image;
  iload_2
  iload_3
  aload_0
  invokevirtual java/awt/Graphics/drawImage(Ljava/awt/Image;IILjava/awt/image/ImageObserver;)Z
  pop
  stop_0:
  aload 4
  ldc "O"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq stop_1
  aload_1
  aload_0
  getfield TicTacToe/notImage Ljava/awt/Image;
  iload_2
  iload_3
  aload_0
  invokevirtual java/awt/Graphics/drawImage(Ljava/awt/Image;IILjava/awt/image/ImageObserver;)Z
  pop
  stop_1:
  return
.end method

.method public paint(Ljava/awt/Graphics;)V
  .limit locals 5
  .limit stack 6
  new joos/lib/JoosDimension
  dup
  aload_0
  invokevirtual java/awt/Component/size()Ljava/awt/Dimension;
  invokenonvirtual joos/lib/JoosDimension/<init>(Ljava/awt/Dimension;)V
  dup
  astore 4
  pop
  aload_1
  new joos/lib/JoosConstants
  dup
  invokenonvirtual joos/lib/JoosConstants/<init>()V
  invokevirtual joos/lib/JoosConstants/black()Ljava/awt/Color;
  invokevirtual java/awt/Graphics/setColor(Ljava/awt/Color;)V
  aload 4
  invokevirtual joos/lib/JoosDimension/width()I
  iconst_3
  idiv
  dup
  istore_2
  pop
  aload 4
  invokevirtual joos/lib/JoosDimension/height()I
  iconst_3
  idiv
  dup
  istore_3
  pop
  aload_1
  iload_2
  iconst_0
  iload_2
  aload 4
  invokevirtual joos/lib/JoosDimension/height()I
  invokevirtual java/awt/Graphics/drawLine(IIII)V
  aload_1
  iconst_2
  iload_2
  imul
  iconst_0
  iconst_2
  iload_2
  imul
  aload 4
  invokevirtual joos/lib/JoosDimension/height()I
  invokevirtual java/awt/Graphics/drawLine(IIII)V
  aload_1
  iconst_0
  iload_3
  aload 4
  invokevirtual joos/lib/JoosDimension/width()I
  iload_3
  invokevirtual java/awt/Graphics/drawLine(IIII)V
  aload_1
  iconst_0
  iconst_2
  iload_3
  imul
  aload 4
  invokevirtual joos/lib/JoosDimension/width()I
  iconst_2
  iload_3
  imul
  invokevirtual java/awt/Graphics/drawLine(IIII)V
  aload_0
  aload_1
  iconst_0
  iload_2
  imul
  iconst_1
  iadd
  iconst_0
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_1
  iload_2
  imul
  iconst_1
  iadd
  iconst_0
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s2 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_2
  iload_2
  imul
  iconst_1
  iadd
  iconst_0
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_0
  iload_2
  imul
  iconst_1
  iadd
  iconst_1
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s4 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_1
  iload_2
  imul
  iconst_1
  iadd
  iconst_1
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_2
  iload_2
  imul
  iconst_1
  iadd
  iconst_1
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s6 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_0
  iload_2
  imul
  iconst_1
  iadd
  iconst_2
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_1
  iload_2
  imul
  iconst_1
  iadd
  iconst_2
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s8 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  aload_0
  aload_1
  iconst_2
  iload_2
  imul
  iconst_1
  iadd
  iconst_2
  iload_3
  imul
  iconst_1
  iadd
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  invokevirtual TicTacToe/paintSquare(Ljava/awt/Graphics;IILjava/lang/String;)V
  return
.end method

.method public legalMove(I)Z
  .limit locals 2
  .limit stack 5
  aload_0
  getfield TicTacToe/f Ljoos/lib/JoosIO;
  ldc "In legalMove is is "
  dup
  ifnull null_0
  goto stop_1
  null_0:
  pop
  ldc "null"
  stop_1:
  new java/lang/Integer
  dup
  iload_1
  invokenonvirtual java/lang/Integer/<init>(I)V
  dup
  ifnull null_2
  invokevirtual java/lang/Integer/toString()Ljava/lang/String;
  goto stop_3
  null_2:
  pop
  ldc "null"
  stop_3:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  iload_1
  iconst_1
  if_icmpeq true_15
  iconst_0
  goto stop_16
  true_15:
  iconst_1
  stop_16:
  dup
  ifeq false_14
  pop
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_17
  iconst_0
  goto stop_18
  true_17:
  iconst_1
  stop_18:
  false_14:
  dup
  ifne true_13
  pop
  iload_1
  iconst_2
  if_icmpeq true_20
  iconst_0
  goto stop_21
  true_20:
  iconst_1
  stop_21:
  dup
  ifeq false_19
  pop
  aload_0
  getfield TicTacToe/s2 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_22
  iconst_0
  goto stop_23
  true_22:
  iconst_1
  stop_23:
  false_19:
  true_13:
  dup
  ifne true_12
  pop
  iload_1
  iconst_3
  if_icmpeq true_25
  iconst_0
  goto stop_26
  true_25:
  iconst_1
  stop_26:
  dup
  ifeq false_24
  pop
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_27
  iconst_0
  goto stop_28
  true_27:
  iconst_1
  stop_28:
  false_24:
  true_12:
  dup
  ifne true_11
  pop
  iload_1
  iconst_4
  if_icmpeq true_30
  iconst_0
  goto stop_31
  true_30:
  iconst_1
  stop_31:
  dup
  ifeq false_29
  pop
  aload_0
  getfield TicTacToe/s4 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_32
  iconst_0
  goto stop_33
  true_32:
  iconst_1
  stop_33:
  false_29:
  true_11:
  dup
  ifne true_10
  pop
  iload_1
  iconst_5
  if_icmpeq true_35
  iconst_0
  goto stop_36
  true_35:
  iconst_1
  stop_36:
  dup
  ifeq false_34
  pop
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_37
  iconst_0
  goto stop_38
  true_37:
  iconst_1
  stop_38:
  false_34:
  true_10:
  dup
  ifne true_9
  pop
  iload_1
  ldc 6
  if_icmpeq true_40
  iconst_0
  goto stop_41
  true_40:
  iconst_1
  stop_41:
  dup
  ifeq false_39
  pop
  aload_0
  getfield TicTacToe/s6 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_42
  iconst_0
  goto stop_43
  true_42:
  iconst_1
  stop_43:
  false_39:
  true_9:
  dup
  ifne true_8
  pop
  iload_1
  ldc 7
  if_icmpeq true_45
  iconst_0
  goto stop_46
  true_45:
  iconst_1
  stop_46:
  dup
  ifeq false_44
  pop
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_47
  iconst_0
  goto stop_48
  true_47:
  iconst_1
  stop_48:
  false_44:
  true_8:
  dup
  ifne true_7
  pop
  iload_1
  ldc 8
  if_icmpeq true_50
  iconst_0
  goto stop_51
  true_50:
  iconst_1
  stop_51:
  dup
  ifeq false_49
  pop
  aload_0
  getfield TicTacToe/s8 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_52
  iconst_0
  goto stop_53
  true_52:
  iconst_1
  stop_53:
  false_49:
  true_7:
  dup
  ifne true_6
  pop
  iload_1
  ldc 9
  if_icmpeq true_55
  iconst_0
  goto stop_56
  true_55:
  iconst_1
  stop_56:
  dup
  ifeq false_54
  pop
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_57
  iconst_0
  goto stop_58
  true_57:
  iconst_1
  stop_58:
  false_54:
  true_6:
  ifeq else_4
  iconst_0
  ireturn
  goto stop_5
  else_4:
  iload_1
  iconst_1
  if_icmpeq true_60
  iconst_0
  goto stop_61
  true_60:
  iconst_1
  stop_61:
  ifeq stop_59
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s1 Ljava/lang/String;
  pop
  stop_59:
  iload_1
  iconst_2
  if_icmpeq true_63
  iconst_0
  goto stop_64
  true_63:
  iconst_1
  stop_64:
  ifeq stop_62
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s2 Ljava/lang/String;
  pop
  stop_62:
  iload_1
  iconst_3
  if_icmpeq true_66
  iconst_0
  goto stop_67
  true_66:
  iconst_1
  stop_67:
  ifeq stop_65
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s3 Ljava/lang/String;
  pop
  stop_65:
  iload_1
  iconst_4
  if_icmpeq true_69
  iconst_0
  goto stop_70
  true_69:
  iconst_1
  stop_70:
  ifeq stop_68
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s4 Ljava/lang/String;
  pop
  stop_68:
  iload_1
  iconst_5
  if_icmpeq true_72
  iconst_0
  goto stop_73
  true_72:
  iconst_1
  stop_73:
  ifeq stop_71
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s5 Ljava/lang/String;
  pop
  stop_71:
  iload_1
  ldc 6
  if_icmpeq true_75
  iconst_0
  goto stop_76
  true_75:
  iconst_1
  stop_76:
  ifeq stop_74
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s6 Ljava/lang/String;
  pop
  stop_74:
  iload_1
  ldc 7
  if_icmpeq true_78
  iconst_0
  goto stop_79
  true_78:
  iconst_1
  stop_79:
  ifeq stop_77
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s7 Ljava/lang/String;
  pop
  stop_77:
  iload_1
  ldc 8
  if_icmpeq true_81
  iconst_0
  goto stop_82
  true_81:
  iconst_1
  stop_82:
  ifeq stop_80
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s8 Ljava/lang/String;
  pop
  stop_80:
  iload_1
  ldc 9
  if_icmpeq true_84
  iconst_0
  goto stop_85
  true_84:
  iconst_1
  stop_85:
  ifeq stop_83
  aload_0
  getfield TicTacToe/mark Ljava/lang/String;
  dup
  aload_0
  swap
  putfield TicTacToe/s9 Ljava/lang/String;
  pop
  stop_83:
  iconst_1
  ireturn
  stop_5:
  nop
.end method

.method public win(Ljava/lang/String;)Z
  .limit locals 2
  .limit stack 2
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_2
  pop
  aload_0
  getfield TicTacToe/s2 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_2:
  dup
  ifeq false_1
  pop
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_1:
  ifeq stop_0
  iconst_1
  ireturn
  stop_0:
  aload_0
  getfield TicTacToe/s4 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_5
  pop
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_5:
  dup
  ifeq false_4
  pop
  aload_0
  getfield TicTacToe/s6 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_4:
  ifeq stop_3
  iconst_1
  ireturn
  stop_3:
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_8
  pop
  aload_0
  getfield TicTacToe/s8 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_8:
  dup
  ifeq false_7
  pop
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_7:
  ifeq stop_6
  iconst_1
  ireturn
  stop_6:
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_11
  pop
  aload_0
  getfield TicTacToe/s4 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_11:
  dup
  ifeq false_10
  pop
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_10:
  ifeq stop_9
  iconst_1
  ireturn
  stop_9:
  aload_0
  getfield TicTacToe/s2 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_14
  pop
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_14:
  dup
  ifeq false_13
  pop
  aload_0
  getfield TicTacToe/s8 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_13:
  ifeq stop_12
  iconst_1
  ireturn
  stop_12:
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_17
  pop
  aload_0
  getfield TicTacToe/s6 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_17:
  dup
  ifeq false_16
  pop
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_16:
  ifeq stop_15
  iconst_1
  ireturn
  stop_15:
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_20
  pop
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_20:
  dup
  ifeq false_19
  pop
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_19:
  ifeq stop_18
  iconst_1
  ireturn
  stop_18:
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  dup
  ifeq false_23
  pop
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_23:
  dup
  ifeq false_22
  pop
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  aload_1
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  false_22:
  ifeq stop_21
  iconst_1
  ireturn
  stop_21:
  iconst_0
  ireturn
  nop
.end method

.method public draw()Z
  .limit locals 1
  .limit stack 2
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_8
  iconst_0
  goto stop_9
  true_8:
  iconst_1
  stop_9:
  dup
  ifeq false_7
  pop
  aload_0
  getfield TicTacToe/s2 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_10
  iconst_0
  goto stop_11
  true_10:
  iconst_1
  stop_11:
  false_7:
  dup
  ifeq false_6
  pop
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_12
  iconst_0
  goto stop_13
  true_12:
  iconst_1
  stop_13:
  false_6:
  dup
  ifeq false_5
  pop
  aload_0
  getfield TicTacToe/s4 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_14
  iconst_0
  goto stop_15
  true_14:
  iconst_1
  stop_15:
  false_5:
  dup
  ifeq false_4
  pop
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_16
  iconst_0
  goto stop_17
  true_16:
  iconst_1
  stop_17:
  false_4:
  dup
  ifeq false_3
  pop
  aload_0
  getfield TicTacToe/s6 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_18
  iconst_0
  goto stop_19
  true_18:
  iconst_1
  stop_19:
  false_3:
  dup
  ifeq false_2
  pop
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_20
  iconst_0
  goto stop_21
  true_20:
  iconst_1
  stop_21:
  false_2:
  dup
  ifeq false_1
  pop
  aload_0
  getfield TicTacToe/s8 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_22
  iconst_0
  goto stop_23
  true_22:
  iconst_1
  stop_23:
  false_1:
  dup
  ifeq false_0
  pop
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  ldc "*"
  invokevirtual java/lang/String/equals(Ljava/lang/Object;)Z
  ifeq true_24
  iconst_0
  goto stop_25
  true_24:
  iconst_1
  stop_25:
  false_0:
  ireturn
  nop
.end method

.method public done()Ljava/lang/String;
  .limit locals 1
  .limit stack 2
  aload_0
  ldc "X"
  invokevirtual TicTacToe/win(Ljava/lang/String;)Z
  ifeq stop_0
  ldc "X"
  areturn
  stop_0:
  aload_0
  ldc "O"
  invokevirtual TicTacToe/win(Ljava/lang/String;)Z
  ifeq stop_1
  ldc "O"
  areturn
  stop_1:
  aload_0
  invokevirtual TicTacToe/draw()Z
  ifeq stop_2
  ldc "D"
  areturn
  stop_2:
  ldc ""
  areturn
  nop
.end method

.method public mouseDown(Ljava/awt/Event;II)Z
  .limit locals 8
  .limit stack 5
  new joos/lib/JoosIO
  dup
  invokenonvirtual joos/lib/JoosIO/<init>()V
  dup
  astore 5
  pop
  new joos/lib/JoosDimension
  dup
  aload_0
  invokevirtual java/awt/Component/size()Ljava/awt/Dimension;
  invokenonvirtual joos/lib/JoosDimension/<init>(Ljava/awt/Dimension;)V
  dup
  astore 4
  pop
  iload_2
  iconst_3
  imul
  aload 4
  invokevirtual joos/lib/JoosDimension/width()I
  idiv
  dup
  istore 6
  pop
  iload_3
  iconst_3
  imul
  aload 4
  invokevirtual joos/lib/JoosDimension/height()I
  idiv
  dup
  istore 7
  pop
  aload 5
  ldc "x = "
  dup
  ifnull null_12
  goto stop_13
  null_12:
  pop
  ldc "null"
  stop_13:
  new java/lang/Integer
  dup
  iload_2
  invokenonvirtual java/lang/Integer/<init>(I)V
  dup
  ifnull null_14
  invokevirtual java/lang/Integer/toString()Ljava/lang/String;
  goto stop_15
  null_14:
  pop
  ldc "null"
  stop_15:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_10
  goto stop_11
  null_10:
  pop
  ldc "null"
  stop_11:
  ldc "y = "
  dup
  ifnull null_16
  goto stop_17
  null_16:
  pop
  ldc "null"
  stop_17:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_8
  goto stop_9
  null_8:
  pop
  ldc "null"
  stop_9:
  new java/lang/Integer
  dup
  iload_3
  invokenonvirtual java/lang/Integer/<init>(I)V
  dup
  ifnull null_18
  invokevirtual java/lang/Integer/toString()Ljava/lang/String;
  goto stop_19
  null_18:
  pop
  ldc "null"
  stop_19:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_6
  goto stop_7
  null_6:
  pop
  ldc "null"
  stop_7:
  ldc "c = "
  dup
  ifnull null_20
  goto stop_21
  null_20:
  pop
  ldc "null"
  stop_21:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_4
  goto stop_5
  null_4:
  pop
  ldc "null"
  stop_5:
  new java/lang/Integer
  dup
  iload 6
  invokenonvirtual java/lang/Integer/<init>(I)V
  dup
  ifnull null_22
  invokevirtual java/lang/Integer/toString()Ljava/lang/String;
  goto stop_23
  null_22:
  pop
  ldc "null"
  stop_23:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_2
  goto stop_3
  null_2:
  pop
  ldc "null"
  stop_3:
  ldc "r = "
  dup
  ifnull null_24
  goto stop_25
  null_24:
  pop
  ldc "null"
  stop_25:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  dup
  ifnull null_0
  goto stop_1
  null_0:
  pop
  ldc "null"
  stop_1:
  new java/lang/Integer
  dup
  iload 7
  invokenonvirtual java/lang/Integer/<init>(I)V
  dup
  ifnull null_26
  invokevirtual java/lang/Integer/toString()Ljava/lang/String;
  goto stop_27
  null_26:
  pop
  ldc "null"
  stop_27:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  aload_0
  iload 6
  iload 7
  iconst_3
  imul
  iadd
  iconst_1
  iadd
  invokevirtual TicTacToe/legalMove(I)Z
  ifeq stop_28
  aload_0
  invokevirtual java/awt/Component/repaint()V
  aload_0
  ldc "o1"
  aload_0
  getfield TicTacToe/s1 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o2"
  aload_0
  getfield TicTacToe/s2 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o3"
  aload_0
  getfield TicTacToe/s3 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o4"
  aload_0
  getfield TicTacToe/s4 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o5"
  aload_0
  getfield TicTacToe/s5 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o6"
  aload_0
  getfield TicTacToe/s6 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o7"
  aload_0
  getfield TicTacToe/s7 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o8"
  aload_0
  getfield TicTacToe/s8 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "o9"
  aload_0
  getfield TicTacToe/s9 Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  ldc "done"
  aload_0
  invokevirtual TicTacToe/done()Ljava/lang/String;
  invokevirtual joos/lib/WigApplet/addResult(Ljava/lang/String;Ljava/lang/String;)V
  aload_0
  invokevirtual joos/lib/WigApplet/openURL()Z
  ifeq stop_29
  aload 5
  ldc "URL opened"
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  stop_29:
  aload_0
  invokevirtual joos/lib/WigApplet/returnResults()Z
  ifeq stop_30
  aload 5
  ldc "results returned"
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  stop_30:
  aload_0
  invokevirtual joos/lib/WigApplet/getResponse()V
  stop_28:
  iconst_1
  ireturn
  nop
.end method

