hi
i have a 2 dimensional array where im trying to create an object (territory) in an if statement when the array is searched and when a certain number is found eg [0][0] a territory is created and placed there?
so far i have writen a few lines but im stumped on creating the object? any help would be create thanks
private Territory[][] createTerritori es()
{
final int _ = -1;...
User Profile
Collapse
-
creating and assigning an object to an array in java
-
i get a .class error saying .class expected... -
-
for loop question
im trying to modify this code using a "for" loop to create 'numPlayers' players. That is, if the user types in 3 for 'numPlayers', then it should loop 3 times and create 3 players.
private void readPlayers()
{
int numPlayers = askForInt("How many players will play?");
String name = askForString("W hat is player 1's name?");
Player... -
non static error message need help thanx guys
hi there guys
im currently doing an assessment and have found this non static error which im stuck at here is my code for the class i know its ugly lol but the teacher started us off lol
public class Player
{
private String name;
private World world;
private int unplacedArmies;
private int placedArmies;
private int turn;
public Player(String name,...
No activity results to display
Show More
Leave a comment: