# Search:

Type: Posts; User: eyesackery

1. ## Thread: Logic Error in noughts and crosses game

by eyesackery
Replies
8
Views
1,363

### Re: Logic Error in noughts and crosses game

I'm not sure what you mean by creating an array with the winning combinations? Couldn't I just use the existing array and check where pieces have been placed on the board?

I came up with a...
2. ## Thread: Logic Error in noughts and crosses game

by eyesackery
Replies
8
Views
1,363

### Re: Logic Error in noughts and crosses game

After a bit more thought that method won't be much more intelligent than the random generated moves.

Does anyone have any suggestions how I can write the computer AI? At the moment the only option...
3. ## Thread: Logic Error in noughts and crosses game

by eyesackery
Replies
8
Views
1,363

### Re: Logic Error in noughts and crosses game

Hey Zaphod_b!

Thanks for the in depth and helpful reply! Putting those print statements throughout the code was such a good idea.

Being able to see what data the program was working with...
4. ## Thread: Logic Error in noughts and crosses game

by eyesackery
Replies
8
Views
1,363

### Logic Error in noughts and crosses game

Here is a nought and crosses game I have been working on today.

Its based on the user playing the computer, where the computers moves are based on a random number generation. However for some...
5. ## Thread: Need help with Java recursion problem!

by eyesackery
Replies
2
Views
680

### Re: Need help with Java recursion problem!

Recursion on the whole has been difficult to understand, but I have been getting through a few easier problems and gaining understanding.

As far as this problem goes, I'll try to write the code I...
6. ## Thread: Need help with Java recursion problem!

by eyesackery
Replies
2
Views
680

### Need help with Java recursion problem!

Hey guys, have been struggling with a recursion homework problem. Would be very appreciative if someone could give me a nudge in the right direction, or a hint. :)

The Question (The algorithm has...
7. ## Thread: Help with Java coding problem!

by eyesackery
Replies
4
Views
1,140

### Re: Help with Java coding problem!

import java.util.*; public class H1D4 {public static void main (String[] args) {while (JPL.test()) {

////////////////////////////// PROBLEM STATEMENT //////////////////////////////
// Given an...
8. ## Thread: Help with Java coding problem!

by eyesackery
Replies
4
Views
1,140

### Re: Help with Java coding problem!

Wow, great advice. The physical deck of cards made me visualize the problem a lot better.

This is how I plan to solve this problem.

I will create a loop that calls the rotateLeft(); method...
9. ## Thread: Help with Java coding problem!

by eyesackery
Replies
4
Views
1,140

### Help with Java coding problem!

This is a problem I have been struggling with, think I'm almost there with it just need a nudge in the right direction. I'm not looking for the answer, just some 'hints' :)

The Problem...
10. ## Thread: Need help with an Array problem!

by eyesackery
Replies
6
Views
1,980

### Re: Need help with an Array problem!

Awesome! Thanks for the replies guys, I managed to figure it out thanks to your help. Now I'm stuck on this problem, if anyone could explain to me the logic I would be very thankful :)
11. ## Thread: Need help with an Array problem!

by eyesackery
Replies
6
Views
1,980

### Re: Need help with an Array problem!

This is what I originally tried to do, which works, but I know is terrible code.

Scanner keyboard = new Scanner(System.in);
int length = keyboard.nextInt();
int[] mainArray = new...
12. ## Thread: Need help with an Array problem!

by eyesackery
Replies
6
Views
1,980

### Re: Need help with an Array problem!

You mean like this?

Scanner keyboard = new Scanner(System.in);
int length = keyboard.nextInt();
int[] mainArray = new int[length];
int evenCount = 0, oddCount = 0;

for (int i =...
13. ## Thread: Need help with an Array problem!

by eyesackery
Replies
6
Views
1,980

### Need help with an Array problem!

Hey guys, really having some trouble solving this Array problem.

I have been trying to use a for loop to loop through the array to find an odd or even number, then a second loop checks whether...
Results 1 to 13 of 13