You are not logged in. Please login at www.codechef.com to post your questions!

×

Need help in Java program

Ok, first off I'm quite new to programming so my program isn't great. This program is supposed to make the user answer a quiz and every time they answer correctly they get to pick a tile on a 3 by 3 tic tac toe board. If they answer incorrectly the computer randomly choses an unoccupied space on the board until either the user or the computer wins. The complete program is not finished yet but I'm having an issue with trivia questions repeating (I wrote some code that was supposed to flag a question after it is used so it doesn't get picked again for the sake of variety). It was just working fine until I got further into the program and now I noticed that I'm getting repeat questions despite the fact I wrote something to prevent it. I don't know where I messed up please help.

here is the code https://text-share.com/view/fdd77f35#fidwkJ0ANKJocc38sBFLUIRNk3EVZPwJ

here is the code when it was still working https://text-share.com/view/7b3f91a8#ARioHkk5LuhyBJE7zHc5iAG4IrWXp34X

Also the program I am using is ready to program with Java. thanks, I just dont get why it suddenly stopped working

Edit: I realized it's gonna be a pain to find what I'm talking about so it's this block which is found in the method quiz. So yea this is what was supposed to prevent the questions from being picked multiple times, which suddenly stopped working after I got further in the program. Here is the block of code I'm talking about: https://text-share.com/view/7f1888bc#Wj5PQPn4hzXevINtLJq9dXUx2vJgNAdp

asked 30 May '18, 10:26

cryptarch's gravatar image

0★cryptarch
11
accept rate: 0%

edited 30 May '18, 10:35

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,698
×1,278
×646
×516
×249

question asked: 30 May '18, 10:26

question was seen: 85 times

last updated: 30 May '18, 10:35