I've made the majority of the program , however, I've been avoiding the most crucial part of the program. Allowing the user to select the pocket they want to play is something i cant figure out how to do. In the module PlayersTurn I've been trying different things to allow the user enter the number of pocket they want to play and then executing their turn. I've been unsuccessful. I don't know where or how to start can someone help me please? thanks.
import java.util.Scanner; import java.util.Random; public class Mancala { public static void main (String[] args) { Scanner keyboard = new Scanner(System.in); int solidLine; int line; int partialLine; int StartArray; final int MAX_VALUE = 97; final int step = 1; final int partial = 1; solidLine( MAX_VALUE); line( step,partial); solidLine( MAX_VALUE); } public static void solidLine(int mv) { for (int s=1;s<=mv;s++) { System.out.print("*"); } System.out.println(); } public static void GameStarter() { String Player1; String Player2; String computerturn; int computerInt; Scanner scan = new Scanner(System.in); Random generator = new Random(); computerInt = generator.nextInt(13); switch (computerInt) { case 0: { computerturn = "1"; break; } case 1: { computerturn = "2"; break; } case 2: { computerturn = "3"; break; } case 3: { computerturn = "4"; break; } case 4: { computerturn = "5"; break; } case 5: { computerturn = "6"; break; } case 6: { computerturn = "7"; break; } case 7: { computerturn = "8"; break; } case 8: { computerturn = "9"; break; } case 9: { computerturn = "10"; break; } case 10: { computerturn = "11"; break; } case 11: { computerturn = "12"; break; } case 12: { computerturn = "13"; break; } case 13: { computerturn = "14"; break; } default: { computerturn = "Wont happen"; } } } public static void PlayersTurn(int[] POCKETS) { } public static void GameCalculator(int[] POCKETS) { POCKETS[0]=POCKETS[1]+POCKETS[2]+POCKETS[3]+POCKETS[4]+POCKETS[5]+POCKETS[6]; POCKETS[7]=POCKETS[8]+POCKETS[9]+POCKETS[10]+POCKETS[11]+POCKETS[12]+POCKETS[13]; if (POCKETS[0] < POCKETS[7]) System.out.println("Player two wins"); else System.out.println("Player one wins"); } public static void StartArray(); { int beadearray; int POCKET = 14; int[] POCKETS = {0,4,4,4,4,4,4,//top part of board 0,4,4,4,4,4,4};//bottom part of board } public static void line(int step, int partial) { for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[0]+ " (1)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[1]+ " (2)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[2]+ " (3)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[3]+ " (4)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[4]+ " (5)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[5]+ " (6)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[6]+ " (7)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[7]+ " (8)" +" *"); } System.out.println(); for (int p=1;p<=partial;p++) { System.out.print("* ************************************************************************* *"); } System.out.println(); for (int l=1;l<=step;l++) { System.out.print("*" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[8]+ " (9)" +" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[9]+ " (10)"+" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[10]+ " (11)"+" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[11]+ " (12)"+" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[12]+ " (13)"+" "); } for (int l=1;l<=step;l++) { System.out.print("* " + POCKETS[13]+ " (14)"+" "); } for (int l=1;l<=step;l++) { System.out.print("* " +" *"); } System.out.println(); } }