Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Square{
- byte rank,move;
- boolean who;
- public void returnAll(){
- getRank();
- getMove();
- getWho();
- }
- public byte getRank(){
- return rank;}
- public byte getMove(){
- return move;}
- public boolean getWho(){
- return who;}
- private byte setRank(byte r){
- return rank=r;}
- private byte setMove(byte m){
- return move=m;}
- private boolean setWho(boolean w){
- return who=w;}
- public void setAll(byte r1, byte m1, boolean w1){
- setRank(r1);
- setMove(m1);
- setWho(w1);
- }
- }
- public class Board{
- public static void main(String[] args){
- Square[][] board = new Square[10][10];
- board[0][0].setAll((byte)2,(byte)1,false);
- System.out.println(board[0][0].getRank());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement