Battle Boats 3d Java Game

25.08.2019
Battle boats 3d java gamesPermalink

Join GitHub today

GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.

Gibi java tabanl telefonlarda oynanabilecek gzel bir araba oyunudu 1 2 3, battle boats 3d 240x400 game free download for nokia asha 305 308 306 309 310 311 java touchscreen phones battle boats 3d is wonderful a posted by brown ark at 23. Play Play Battleboats.io at Game-io to conquer more challenges and missions. Like other io games, in this Play Battleboats.io, you battle against other players and beat them!

Sign up

Java 3d Game Engine

Find file Copy path
Battle Boats 3d Java Game

Battle Boats 3d Java Game Download

Cannot retrieve contributors at this time
//Written by bello067
publicclassBattleboat {
privateint size =3;
privateboolean orientation; // false <-> horizontal, true <-> vertical
privateCell[] spaces;
privatechar status;
publicBattleboat(){ //constructor for boat
spaces =newCell[size];
if(Math.random() <0.5 ){ //randomly makes boat horizontal or vertical
orientation =true;
for(int i =0; i < size;i++){
spaces[i] =newCell(0,i,'B'); //makes boat vertical
}
}
else{
orientation =false;
for(int i =0; i < size;i++){
spaces[i] =newCell(i,0,'B'); // makes boat horizontal
}
}
}
publicbooleanget_orientation(){ //returns orientation of boat
return orientation;
}
publicintget_size(){ //returns size of the boat
return size;
}
publicCell[] get_spaces(){ //returns spaces that make up boat
return spaces;
}
publiccharget_status(){ //returns status of boat
return status;
}
publicvoidset_spaces(inti, introw, intcol,charc){ //sets spaces of boat
spaces[i] =newCell(row, col, c);
}
}
  • Copy lines
  • Copy permalink
Comments are closed.