I've been trying for a while and can't figure it out
http://pastebin.com/4PZj2c9s
SumTingWong59
0
Newbie Poster
Recommended Answers
Jump to Post
- Check if the board is full, meaning that all cells are occupied and not empty
- Then make sure there aren't any winning patterns for 'x' -- use your checkAll('x')
- Then make sure there aren't any winning patterns for 'o' -- use your checkAll('o')
- If all the above passed then it …
Jump to PostIt should be something like so, in psuedo code:
bool isFull(board){ bool isFull = true; for i = 0 to board.length # 0 <= i <= 8 if board[i] != 'x' && board[i] != 'o' isFull = false; break; return isFull; }
All 7 Replies
mrnutty
761
Senior Poster
SumTingWong59
0
Newbie Poster
mrnutty
761
Senior Poster
SumTingWong59
0
Newbie Poster
SumTingWong59
0
Newbie Poster
SumTingWong59
0
Newbie Poster
TrustyTony
888
pyMod
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.