-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlayerServer.java
113 lines (93 loc) · 2 KB
/
PlayerServer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package pingpong;
import java.io.Serializable;
public class PlayerServer implements Serializable{
/**
* Server Player Properties
*/
private static final long serialVersionUID = 1L;
//////////////////////////
// - Server Variables - //
//////////////////////////
private String name;
private int x, y;
private int ballx, bally;
private int scoreS = 0;
private int scoreP = 0;
private String imessage="";
private String omessage="";
private boolean restart = false;
public boolean isRestart() {
return restart;
}
public void setRestart(boolean restart) {
this.restart = restart;
}
public PlayerServer(){
x = 50;
y = 200;
ballx = 380;
bally = 230;
}
///////////////////////////
// - Getters & Setters - //
///////////////////////////
public String getName() {
return name;
}
public String getImessage() {
return imessage;
}
public void setImessage(String imessage) {
this.imessage = imessage;
}
public String getOmessage() {
return omessage;
}
public void setOmessage(String omessage) {
this.omessage = omessage;
}
public void setName(String name) {
this.name = name;
}
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 int getBallx() {
return ballx;
}
public void setBallx(int ballx) {
this.ballx = ballx;
}
public int getBally() {
return bally;
}
public void setBally(int bally) {
this.bally = bally;
}
public int getScoreS() {
return scoreS;
}
public void setScoreS(int scoreS) {
this.scoreS = scoreS;
}
public int getScoreP() {
return scoreP;
}
public void setScoreP(int scoreP) {
this.scoreP = scoreP;
}
}