Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Exercise: Simplified Tic Tac Toe PowerPoint Presentation
Download Presentation
Exercise: Simplified Tic Tac Toe

Exercise: Simplified Tic Tac Toe

56 Views Download Presentation
Download Presentation

Exercise: Simplified Tic Tac Toe

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Exercise:SimplifiedTic Tac Toe 1 Set JPanel's preferred size to 300 x 300 Use an array of JButtons Build buttons with empty text (i.e. ””) in them Set the button’s preferred size to 100,100 Change button’s font using setFont(new Font(“Arial”, 0, 48)) User’s button click sets text to “X” Computer chooses first empty button for its “O” (dumb computer;) Computer always allows user to move first (dumb computer;) Ignore end of game (computer is sore loser;)