• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help figure out why tie does not work on my TicTacToeGUIGame  RSS feed

 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help figure out why tie does not work on my TicTacToeGUIGame. the X wins works, the O wins works, it's the tie that does not work. Here is the code. Thanks for your time and effort. Danny

TicTacToeGUIGame:

 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help figure out why tie does not work on my TicTacToeGUIGame. the X wins works, the O wins works, it's the tie that does not work. Here is the code.

Sorry but I can't see any code that checks to see if a tie has occurred.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Danny,

There might be issue with your checkWinner method - I haven't gone through the code yet.

However, what I found is - there is nothing in code to declare tie - e.g. your result always contains text as 'Noughts win' or 'Crosses win'.

Maybe you need to check that first (i.e. how to identify the tie).
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thank you Danny
 
Campbell Ritchie
Marshal
Posts: 56570
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The good news is, Prasanna Raman has a definition of a tied game.
The bad news is, it is in this thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!