Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package defult;
- import java.util.*;
- public class Domino
- {
- int x;
- int y;
- public int getX()
- {
- return x;
- }
- public void setX(int x)
- {
- this.x = x;
- }
- public int getY()
- {
- return y;
- }
- public void setY(int y)
- {
- this.y = y;
- }
- public Domino(int x)
- {
- this.x = x;
- this.y = x;
- }
- public Domino()
- {
- this.x = (int)(Math.random() *6) +1;
- this.y = (int)(Math.random() *6) +1;
- }
- public String toString()
- {
- return this.x + "," + this.y;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement